diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-06-18 18:05:04 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-06-23 16:29:19 +0100 |
commit | 6e03858dc7c909fb9446c3aaf6c6bc6d17604585 (patch) | |
tree | ee88ded8fb599a27446e8a31bad1179d10f744ca /script/mailin | |
parent | b2871d8f9cf90588c3ae941fc3e76687f080bf3e (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/mailin')
-rwxr-xr-x | script/mailin | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/script/mailin b/script/mailin index 65f9d06f2..f6b7d1194 100755 --- a/script/mailin +++ b/script/mailin @@ -8,7 +8,7 @@ OUTPUT=$(mktemp -t foi-mailin-output-XXXXXXXX) # Read the email message from stdin, and write it to the file $INPUT cat >"$INPUT" -cd "$(dirname "$0")"/.. +cd "$(dirname "${BASH_SOURCE[0]}")"/.. source commonlib/shlib/deployfns read_conf config/general |