aboutsummaryrefslogtreecommitdiffstats
path: root/script/rails-post-deploy
diff options
context:
space:
mode:
Diffstat (limited to 'script/rails-post-deploy')
-rwxr-xr-xscript/rails-post-deploy14
1 files changed, 7 insertions, 7 deletions
diff --git a/script/rails-post-deploy b/script/rails-post-deploy
index a9e239423..4048c852f 100755
--- a/script/rails-post-deploy
+++ b/script/rails-post-deploy
@@ -11,8 +11,8 @@
set -e
#set -x # debug
-APP_DIR="$(readlink -f $(dirname "$BASH_SOURCE")/..)"
-cd "$APP_DIR"
+TOP_DIR="$(dirname "$BASH_SOURCE")/.."
+cd "$TOP_DIR"
# make sure that there is an app directory, so are in a rails app tree
if ! [ -d app ]
@@ -32,11 +32,11 @@ else
fi
# create initial log files
-if [ -e $APP_DIR/../logs ]
+if [ -e $TOP_DIR/../logs ]
then
# mySociety servers have logs dir in level above
rm -f log
- ln -s $APP_DIR/../logs log
+ ln -s $TOP_DIR/../logs log
else
# otherwise just make the directory
if [ -h log ]
@@ -47,10 +47,10 @@ else
mkdir -p log
fi
# link the "downloads" directory in the cache to somewhere it can be served
-if [ ! -e "$APP_DIR/public/download" ]
+if [ ! -e "$TOP_DIR/public/download" ]
then
- mkdir -p "$APP_DIR/cache/zips/download"
- ln -s "$APP_DIR/cache/zips/download" "$APP_DIR/public/"
+ mkdir -p "$TOP_DIR/cache/zips/download"
+ ln -s "$TOP_DIR/cache/zips/download" "$TOP_DIR/public/"
fi
cd log