summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2018-10-03 02:12:15 -0400
committerLuke Shumaker <lukeshu@parabola.nu>2018-10-07 19:11:28 -0400
commitc58f0828916ba7dbd471470caae19d136cacab43 (patch)
treeafdb60771981cb6de06283db59697c0a46fe5053
parentf3acb1c2bb0f899acbf8113631cf2fe4f9930cb4 (diff)
config: readlink BASH_SOURCE[0] to find config.local
This means that *only* `config` needs to exist in /opt/dbscripts, there don't need to be symlinks for all of the local files, they can be in /etc only.
-rw-r--r--config2
1 files changed, 1 insertions, 1 deletions
diff --git a/config b/config
index 3cbc176..6defa92 100644
--- a/config
+++ b/config
@@ -42,5 +42,5 @@ LIST="arch-dev-public@archlinux.org"
FROM="repomaint@archlinux.org"
# Override default config with config.local
-LOCAL_CONFIG=${DBSCRIPTS_CONFIG:-"$(dirname ${BASH_SOURCE[0]})/config.local"}
+LOCAL_CONFIG=${DBSCRIPTS_CONFIG:-"$(dirname -- "$(readlink -e -- "${BASH_SOURCE[0]}")")/config.local"}
if [[ -f "${LOCAL_CONFIG}" ]]; then . "${LOCAL_CONFIG}"; fi