aboutsummaryrefslogtreecommitdiff
path: root/bpkg-rep/publish.in
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-10-20 20:15:52 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-10-20 20:15:52 +0300
commitdc2bc9ae84a9d74beae7e2e8dd4b9015fdf176ec (patch)
treedaf0feb236adb0487f0dcd5c6d987cc3561cf7f9 /bpkg-rep/publish.in
parentfd4b8ec3d690fa7341159b0166b382dd43c6c967 (diff)
Add --config option for bpkg-rep-publish script
Diffstat (limited to 'bpkg-rep/publish.in')
-rw-r--r--bpkg-rep/publish.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/bpkg-rep/publish.in b/bpkg-rep/publish.in
index e828692..1c2f88d 100644
--- a/bpkg-rep/publish.in
+++ b/bpkg-rep/publish.in
@@ -59,6 +59,12 @@
# Run quiet. Specifically, don't dump the log to stderr on exit with zero
# status.
#
+# --config <path>
+#
+# The configuration file containing a bash fragment. Repeat this option to
+# specify multiple configurations that will be sourced in the order
+# specified.
+#
# --bpkg <path>
#
# The package manager program to be used for the repository update. This
@@ -79,6 +85,7 @@ timeout=60
lock_timeout=0
log_dir=
quiet=
+configurations=()
bpkg=
while [ $# -gt 0 ]; do
@@ -107,6 +114,11 @@ while [ $# -gt 0 ]; do
shift
quiet=true
;;
+ --config)
+ shift
+ configurations+=("$1")
+ shift || true
+ ;;
--bpkg)
shift
bpkg="$1"
@@ -203,6 +215,12 @@ if [ -n "$log_dir" ]; then
trap exit_trap EXIT
fi
+# Source the configurations.
+#
+for c in "${configurations[@]}"; do
+ source "$c" >&2
+done
+
# Make sure the commit file is present.
#
published_commit="$repo_dir.publish"