aboutsummaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rwxr-xr-xscript/rails-post-deploy9
1 files changed, 7 insertions, 2 deletions
diff --git a/script/rails-post-deploy b/script/rails-post-deploy
index bd99b0ce2..a9e239423 100755
--- a/script/rails-post-deploy
+++ b/script/rails-post-deploy
@@ -11,10 +11,15 @@
set -e
#set -x # debug
-APP_DIR=`pwd`
+APP_DIR="$(readlink -f $(dirname "$BASH_SOURCE")/..)"
+cd "$APP_DIR"
# make sure that there is an app directory, so are in a rails app tree
-cd app/..
+if ! [ -d app ]
+then
+ echo "Error: the 'app' directory didn't exist"
+ exit 1
+fi
# read config file in for later (STAGING_SITE)
if [ -e "config/general" ] || [ -e "config/general.yml" ]