Skip to content

Commit 0956175

Browse files
phlogistonjohnmergify[bot]
authored andcommitted
images/common: add a 2nd argument for a sambacc version suffix
In the sambacc install script, when installing sambacc from a rpm repo with dnf, allow the caller to specify a version suffix in order to restrict the install to a particular version. Signed-off-by: John Mulligan <[email protected]>
1 parent 05d46b8 commit 0956175

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

images/common/install-sambacc-common.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
install_sambacc() {
44
local distdir="$1"
5+
local sambacc_version_suffix="$2"
56
if ! [ -d "${distdir}" ]; then
67
echo "warning: no directory: ${distdir}" >&2
78
else
@@ -65,7 +66,7 @@ install_sambacc() {
6566
install-from-repo)
6667
local tgt="${repofiles[0]}"
6768
cp "${tgt}" /etc/yum.repos.d/"$(basename "${tgt}")"
68-
dnf install -y python3-sambacc
69+
dnf install -y "python3-sambacc${sambacc_version_suffix}"
6970
dnf clean all
7071
container_json_file="/usr/share/sambacc/examples/${DEFAULT_JSON_FILE}"
7172
;;
@@ -82,7 +83,7 @@ install_sambacc() {
8283
copr_args+=("centos-stream+epel-next-9-$(uname -p)")
8384
fi
8485
dnf copr enable -y "${copr_args[@]}"
85-
dnf install -y python3-sambacc
86+
dnf install -y "python3-sambacc${sambacc_version_suffix}"
8687
dnf clean all
8788
container_json_file="/usr/share/sambacc/examples/${DEFAULT_JSON_FILE}"
8889
;;

0 commit comments

Comments
 (0)