aboutsummaryrefslogtreecommitdiff
path: root/update-ipasam-rpm.sh
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2023-05-30 12:06:23 -0400
committerB. Stack <bgstack15@gmail.com>2023-05-30 12:06:23 -0400
commite3162f957dee1e1c652651aac0946b478700f423 (patch)
treeae8643be8caa83d49812ffcf669d3a45d221234b /update-ipasam-rpm.sh
parenthandle updated page view, and dynamic chroot listing (diff)
downloadipasam-master.tar.gz
ipasam-master.tar.bz2
ipasam-master.zip
fix error in excluded_chrootsHEADmaster
Diffstat (limited to 'update-ipasam-rpm.sh')
-rwxr-xr-xupdate-ipasam-rpm.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/update-ipasam-rpm.sh b/update-ipasam-rpm.sh
index ad9f81e..509917a 100755
--- a/update-ipasam-rpm.sh
+++ b/update-ipasam-rpm.sh
@@ -9,6 +9,7 @@
# Purpose: Build new ipasam package when ipa-server-trust-ad increments
# History:
# 2022-12-01 improve to handle current page design, and dynamically learn all copr chroots to exclude
+# 2023-05-30 fix error with excluded_chroots
# Usage:
# on AlmaLinux 8 system (storage3) in cron.
# Dependencies:
@@ -53,8 +54,9 @@ test ! -d "${logfd}" && mkdir -p "${logfd}"
available_chroots="$( copr list bgstack15 | awk -v "name=${coprrepo}" '/Name:/ && $0 ~ name {a=1} /Name:/ && $0 !~ name {a=0} /results/{if(a==1)print $1;}' | tr -d ':' )"
# exclude all chroots except epel-7-x86_64 epel-8-x86_64
excluded_chroots="$( echo "${available_chroots}" | grep -vE 'epel-[78]-x86_64' )"
- copr build $( for word in ${excluded_chroots} ; do printf "%s %s" "--exclude-chroot" "${word}" ) --nowait "${coprrepo}" ~/rpmbuild/SRPMS/ipasam-${new_ver}.src.rpm
- test ! -d "${old_ver_fd}" && mkdir p "${old_ver_fd}"
+ excluded_chroots_long="$( for word in ${excluded_chroots} ; do printf "%s %s" " --exclude-chroot" "${word}" ; done )"
+ copr build ${excluded_chroots_long} --nowait "${coprrepo}" ~/rpmbuild/SRPMS/ipasam-${new_ver}.src.rpm
+ test ! -d "${old_ver_fd}" && mkdir -p "${old_ver_fd}"
echo "${new_ver}" > "${old_ver_file}"
rm ~/.cache/ipasam.spec
}
bgstack15