From: Ian Kelling Date: Sun, 5 Feb 2017 04:06:52 +0000 (-0800) Subject: slighly more robust initial cd X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=10095af47126071a9def7bb38cb94908478c9f72;p=mediawiki-setup slighly more robust initial cd --- diff --git a/get-wiki-snapshot b/get-wiki-snapshot index b89bafa..07e5a5e 100755 --- a/get-wiki-snapshot +++ b/get-wiki-snapshot @@ -7,7 +7,7 @@ trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR # usage: get-wiki-snapshot [-l] # -l means generate script from local guide, don't download new one. -cd "${BASH_SOURCE%/*}" +x="$(readlink -f "$BASH_SOURCE")"; cd ${x%/*} script_file=mw-setup-script