aboutsummaryrefslogtreecommitdiffstats
path: root/script/rails-post-deploy
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-05-29 15:44:04 +0100
committerLouise Crow <louise.crow@gmail.com>2013-05-29 16:20:48 +0100
commitb4346ad162eb153fbe785cf9f6322f3e6305088a (patch)
tree50bcf67a5b354c4f2a3b31478f059ba64cefa9eb /script/rails-post-deploy
parent16c075c68159ef79dd196196a4171f54934f9c41 (diff)
Now that runner is invoked via the rails command and not directly from the script directory, it's more important to cd to the app directory in order to pick up the bundler gemfile. Fixes #964.
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