From dc2bc9ae84a9d74beae7e2e8dd4b9015fdf176ec Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 20 Oct 2018 20:15:52 +0300 Subject: Add --config option for bpkg-rep-publish script --- bpkg-rep/publish.in | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'bpkg-rep') 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 +# +# The configuration file containing a bash fragment. Repeat this option to +# specify multiple configurations that will be sourced in the order +# specified. +# # --bpkg # # 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" -- cgit v1.1