11#! /bin/bash
22PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
33FROMMAIL=
" Compose Tracker <[email protected] >" 4+ export RLVER=10
5+ source " /root/toolkit/sync/common"
46rm -rf /etc/pungi-prod-10
5- git clone https://git.rockylinux.org/rocky/pungi-rocky.git -b r10.0 /etc/pungi-prod-10
7+ git clone https://git.rockylinux.org/rocky/pungi-rocky.git -b " r ${REVISION} " /etc/pungi-prod-10
68ret_val=$?
79if [ " $ret_val " -ne 0 ]; then
810 echo " Git pull failed for prod pungi config" | mutt -e " set from=\" $FROMMAIL \" " \
@@ -11,24 +13,24 @@ if [ "$ret_val" -ne 0 ]; then
11131214 exit 1
1315fi
14- pushd /etc/pungi-prod-10/scripts/compose
16+ pushd /etc/pungi-prod-10/scripts/compose || { echo " Cron: Failed to change directory " ; exit 1 ; }
1517bash updates-10-full.sh
1618ret_val=$?
17- popd
19+ popd || { echo " Cron: Could not change back to original directory " ; exit 1 ; }
1820
1921if [ " $ret_val " -eq 0 ]; then
20- pushd /root/toolkit/sync
22+ pushd /root/toolkit/sync || { echo " Cron: Failed to change directory " ; exit 1 ; }
2123 RLVER=10 bash sync-to-staging.sh Rocky-devel
2224 RLVER=10 bash sync-to-staging.sh Extras
2325 RLVER=10 bash sync-to-staging.sh Rocky
24- popd
26+ popd || { echo " Cron: Could not change back to original directory " ; exit 1 ; }
2527
2628 # Errata is not ready for 10 yet.
27- # pushd /mnt/repos-staging/mirror/pub/rocky/10.0
29+ # pushd /mnt/repos-staging/mirror/pub/rocky/${REVISION}
2830 # python3 /usr/local/bin/apollo_tree -p $(pwd) -n 'Rocky Linux 10 $arch' -i Live -i Minimal -i devel -i extras -i images -i isos -i live -i metadata -i Devel -i plus -i nfv
2931 # popd
3032
31- pushd /root/toolkit/sync
33+ pushd /root/toolkit/sync || { echo " Cron: Failed to change directory " ; exit 1 ; }
3234 RLVER=10 bash sign-repos-only.sh
33- popd
35+ popd || { echo " Cron: Could not change back to original directory " ; exit 1 ; }
3436fi
0 commit comments