Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-01-15 14:02:05 +0100
committerErich Eckner <git@eckner.net>2019-01-15 14:02:05 +0100
commitb0e6586805a456fe8430abc2b5eb4601b7e0eed2 (patch)
tree4a17d2c934409223633f10f8cbe865c8d91b1f6b
parent8d58bec9248b49b33394ff1b59dce0d30a7607d7 (diff)
lib/load-configuration: do "set +e" if run from bash and base_dir already set, too
-rwxr-xr-xlib/load-configuration14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/load-configuration b/lib/load-configuration
index 01f922d..b4f0474 100755
--- a/lib/load-configuration
+++ b/lib/load-configuration
@@ -22,16 +22,18 @@ else
i_am_the_master=false
fi
-if [ -z "${base_dir}" ]; then
- # dirty hack to get this stuff debugable from a bash
- if [ "x${0##*/}" = "x-bash" ] || [ "x${0##*/}" = "xbash" ] || [ "x${0##*/}" = "xdash" ]; then
+# dirty hack to get this stuff debugable from a bash
+if [ "x${0##*/}" = "x-bash" ] || [ "x${0##*/}" = "xbash" ] || [ "x${0##*/}" = "xdash" ]; then
+ set +e
+ if [ -z "${base_dir}" ]; then
base_dir=$(pwd)
- set +e
- else
- base_dir=$(printf '%s/..' "$(dirname "$(readlink -f "$0")")")
fi
fi
+if [ -z "${base_dir}" ]; then
+ base_dir=$(printf '%s/..' "$(dirname "$(readlink -f "$0")")")
+fi
+
work_dir="${base_dir}/work"
# shellcheck source=../lib/common-functions