Skip to content

Commit 6cf372e

Browse files
committed
cron: shellcheck, make sure we source from common sync
1 parent 64ccd55 commit 6cf372e

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

cron/stable-updates-10

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#!/bin/bash
22
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
33
FROMMAIL="Compose Tracker <[email protected]>"
4+
export RLVER=10
5+
source "/root/toolkit/sync/common"
46
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
68
ret_val=$?
79
if [ "$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
1113
1214
exit 1
1315
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; }
1517
bash updates-10-full.sh
1618
ret_val=$?
17-
popd
19+
popd || { echo "Cron: Could not change back to original directory"; exit 1; }
1820

1921
if [ "$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; }
3436
fi

0 commit comments

Comments
 (0)