aboutsummaryrefslogtreecommitdiffstats
path: root/script/handle-mail-replies
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-06-18 18:05:04 +0100
committerLouise Crow <louise.crow@gmail.com>2015-06-23 16:29:19 +0100
commit6e03858dc7c909fb9446c3aaf6c6bc6d17604585 (patch)
treeee88ded8fb599a27446e8a31bad1179d10f744ca /script/handle-mail-replies
parentb2871d8f9cf90588c3ae941fc3e76687f080bf3e (diff)
Use BASH_SOURCE to return the script path.
It is reliable in the case where the script is sourced from another script.
Diffstat (limited to 'script/handle-mail-replies')
-rwxr-xr-xscript/handle-mail-replies2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/handle-mail-replies b/script/handle-mail-replies
index 15454b311..267ad5632 100755
--- a/script/handle-mail-replies
+++ b/script/handle-mail-replies
@@ -1,4 +1,4 @@
#!/bin/bash
-cd "`dirname "$0"`"
+cd "`dirname "${BASH_SOURCE[0]}"`"
exec bundle exec ./handle-mail-replies.rb "$@"