1
1
#! /bin/bash
2
2
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
3
3
FROMMAIL=
" Compose Tracker <[email protected] >"
4
+ export RLVER=10
5
+ source " /root/toolkit/sync/common"
4
6
rm -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
6
8
ret_val=$?
7
9
if [ " $ret_val " -ne 0 ]; then
8
10
echo " Git pull failed for prod pungi config" | mutt -e " set from=\" $FROMMAIL \" " \
@@ -11,24 +13,24 @@ if [ "$ret_val" -ne 0 ]; then
11
13
12
14
exit 1
13
15
fi
14
- pushd /etc/pungi-prod-10/scripts/compose
16
+ pushd /etc/pungi-prod-10/scripts/compose || { echo " Cron: Failed to change directory " ; exit 1 ; }
15
17
bash updates-10-full.sh
16
18
ret_val=$?
17
- popd
19
+ popd || { echo " Cron: Could not change back to original directory " ; exit 1 ; }
18
20
19
21
if [ " $ret_val " -eq 0 ]; then
20
- pushd /root/toolkit/sync
22
+ pushd /root/toolkit/sync || { echo " Cron: Failed to change directory " ; exit 1 ; }
21
23
RLVER=10 bash sync-to-staging.sh Rocky-devel
22
24
RLVER=10 bash sync-to-staging.sh Extras
23
25
RLVER=10 bash sync-to-staging.sh Rocky
24
- popd
26
+ popd || { echo " Cron: Could not change back to original directory " ; exit 1 ; }
25
27
26
28
# 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}
28
30
# 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
29
31
# popd
30
32
31
- pushd /root/toolkit/sync
33
+ pushd /root/toolkit/sync || { echo " Cron: Failed to change directory " ; exit 1 ; }
32
34
RLVER=10 bash sign-repos-only.sh
33
- popd
35
+ popd || { echo " Cron: Could not change back to original directory " ; exit 1 ; }
34
36
fi
0 commit comments