aboutsummaryrefslogtreecommitdiff
path: root/.app/lib/app-instance
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-10-18 13:38:58 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2012-10-18 13:38:58 +0200
commit83c13f1181c4062ca5296ea956e950064bde0ffe (patch)
treeea021190acabc6e675510e13987cd4addbf50765 /.app/lib/app-instance
parent993c9a7807e38b365f48334fff6640e07647af03 (diff)
downloadapp.sh-83c13f1181c4062ca5296ea956e950064bde0ffe.tar.gz
app.sh-83c13f1181c4062ca5296ea956e950064bde0ffe.tar.bz2
app.sh-83c13f1181c4062ca5296ea956e950064bde0ffe.tar.xz
app.sh-83c13f1181c4062ca5296ea956e950064bde0ffe.zip
o Making all scripts be run from the root/ directory. Do not assume you're in current/.
Diffstat (limited to '.app/lib/app-instance')
-rw-r--r--.app/lib/app-instance5
1 files changed, 3 insertions, 2 deletions
diff --git a/.app/lib/app-instance b/.app/lib/app-instance
index 89102b5..5b34bf1 100644
--- a/.app/lib/app-instance
+++ b/.app/lib/app-instance
@@ -191,7 +191,7 @@ method_install() {
echo "Unpacking..."
unzip -q -d $name/$instance/versions/$resolved_version $zip_file
- if [ ! -d $apps/$name/$instance/versions/$resolved_version/root ]
+ if [ ! -d $name/$instance/versions/$resolved_version/root ]
then
echo "Invalid zip file, did not contain a ./root directory." >&2
exit 1
@@ -207,6 +207,7 @@ method_install() {
if [ -x scripts/postinstall ]
then
echo "Running postinstall..."
+ cd root
set +e
env -i \
PATH=/bin:/usr/bin \
@@ -215,7 +216,7 @@ method_install() {
APPSH_NAME=$name \
APPSH_INSTANCE=$instance \
APPSH_VERSION=$resolved_version \
- scripts/postinstall
+ ../scripts/postinstall
set -e
ret=`echo $?`
if [ "$ret" != 0 ]