slighly more robust initial cd
authorIan Kelling <ian@iankelling.org>
Sun, 5 Feb 2017 04:06:52 +0000 (20:06 -0800)
committerIan Kelling <ian@iankelling.org>
Sun, 5 Feb 2017 04:06:52 +0000 (20:06 -0800)
get-wiki-snapshot

index b89bafa7f122a5e5ab8c7a6618e251d58869a2f5..07e5a5e225dc06a9e13c042aaad8fa2724438815 100755 (executable)
@@ -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