diff options
-rwxr-xr-x | update-ipasam-rpm.sh | 6 |
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 } |