From b4346ad162eb153fbe785cf9f6322f3e6305088a Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Wed, 29 May 2013 15:44:04 +0100 Subject: 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. --- script/rails-post-deploy | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'script/rails-post-deploy') 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 -- cgit v1.2.3