aboutsummaryrefslogtreecommitdiffstats
path: root/script/purge-varnish
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-05-29 16:27:31 +0100
committerLouise Crow <louise.crow@gmail.com>2013-05-29 16:27:31 +0100
commitbe5e79381f488de84a4d65492f50f8bc1257396b (patch)
tree0ac879ac5d350d242a6ad5dc6a12f8e243afce02 /script/purge-varnish
parent29e6847f609ea0480b15d6b974d10c504c008262 (diff)
parentb97e1af431ca491132cbc56d3bc570639482fffc (diff)
Merge branch 'rails-3-develop' into release/0.11
Diffstat (limited to 'script/purge-varnish')
-rwxr-xr-xscript/purge-varnish7
1 files changed, 4 insertions, 3 deletions
diff --git a/script/purge-varnish b/script/purge-varnish
index 7dcecd4f9..abc6daeaf 100755
--- a/script/purge-varnish
+++ b/script/purge-varnish
@@ -1,11 +1,12 @@
#!/bin/bash
-LOC=`dirname $0`
+TOP_DIR="$(dirname "$BASH_SOURCE")/.."
+cd "$TOP_DIR"
if [ "$1" == "--loop" ]
then
- rails runner 'PurgeRequest.purge_all_loop'
+ bundle exec rails runner 'PurgeRequest.purge_all_loop'
else
- rails runner 'PurgeRequest.purge_all'
+ bundle exec rails runner 'PurgeRequest.purge_all'
fi