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>2023-06-11 18:45:23 +0200
committerErich Eckner <git@eckner.net>2023-06-11 18:45:23 +0200
commit71d3bddf40149879617d1d6343c83e9ae6514151 (patch)
tree158b3543cfb2f6875a828ea8467bf0537c611932
parent60fd162d7b33a33a9c4c1a22a3b2a1f9298327e1 (diff)
extract path to configuration into variable
* prepare for overwriting location of configuration dir
-rwxr-xr-xbin/build-master-status2
-rwxr-xr-xbin/seed-build-list4
-rwxr-xr-xlib/load-configuration14
3 files changed, 11 insertions, 9 deletions
diff --git a/bin/build-master-status b/bin/build-master-status
index 7a17923..b66ba2b 100755
--- a/bin/build-master-status
+++ b/bin/build-master-status
@@ -18,7 +18,7 @@ if ! verbose_flock -n 9; then
fi
# update todos
-find "${base_dir}/bin/" "${base_dir}/conf/" "${base_dir}/lib/" -type f \
+find "${base_dir}/bin/" "${conf_dir}/" "${base_dir}/lib/" -type f \
-exec grep -nHF '' '{}' \; | \
sed 's,^'"$(str_to_regex "${base_dir}")"'/,,' | \
sed -n '
diff --git a/bin/seed-build-list b/bin/seed-build-list
index d8018a4..343a07b 100755
--- a/bin/seed-build-list
+++ b/bin/seed-build-list
@@ -171,12 +171,12 @@ if ${update}; then
fi
fi
-if [ -r "${base_dir}/conf/seed-ignore-packages" ]; then
+if [ -r "${conf_dir}/seed-ignore-packages" ]; then
sed '
s@/@\t@
t
s/^/any\t/
- ' "${base_dir}/conf/seed-ignore-packages" >> \
+ ' "${conf_dir}/seed-ignore-packages" >> \
"${tmp_dir}/ignore-packages"
fi
diff --git a/lib/load-configuration b/lib/load-configuration
index 22b6608..ca1a713 100755
--- a/lib/load-configuration
+++ b/lib/load-configuration
@@ -141,21 +141,23 @@ fi
# possibly pull in custom modifications
-if [ -r "${base_dir}/conf/common.conf" ]; then
+conf_dir="${base_dir}/conf"
+
+if [ -r "${conf_dir}/common.conf" ]; then
# shellcheck source=/dev/null
- . "${base_dir}/conf/common.conf"
+ . "${conf_dir}/common.conf"
fi
if ${i_am_the_master} && \
- [ -r "${base_dir}/conf/master.conf" ]; then
+ [ -r "${conf_dir}/master.conf" ]; then
# shellcheck source=/dev/null
- . "${base_dir}/conf/master.conf"
+ . "${conf_dir}/master.conf"
fi
if ! ${i_am_the_master} && \
- [ -r "${base_dir}/conf/slave.conf" ]; then
+ [ -r "${conf_dir}/slave.conf" ]; then
# shellcheck source=../conf/slave.conf.example
- . "${base_dir}/conf/slave.conf"
+ . "${conf_dir}/slave.conf"
fi
# check / set up environment