Skip to content

Commit 95d7223

Browse files
committed
shellcheck for crons
1 parent 9333893 commit 95d7223

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

cron/stable-updates-10

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if [ "$ret_val" -eq 0 ]; then
2626
popd || { echo "Cron: Could not change back to original directory"; exit 1; }
2727

2828
# HighAvailability has no errata in the API at this time
29-
pushd /mnt/repos-staging/mirror/pub/rocky/${REVISION}
29+
pushd /mnt/repos-staging/mirror/pub/rocky/${REVISION} || { echo "Cron: Directory doesn't exist"; exit 1; }
3030
python3 /usr/local/bin/apollo_tree -p $(pwd) \
3131
-n "Rocky Linux ${REVISION} \$arch" \
3232
-i extras \
@@ -40,7 +40,7 @@ if [ "$ret_val" -eq 0 ]; then
4040
-i SAPHANA \
4141
-i HighAvailability \
4242
-x riscv64
43-
popd
43+
popd || { echo "Cron: Could not change back to original directory"; exit 1; }
4444

4545
pushd /root/toolkit/sync || { echo "Cron: Failed to change directory"; exit 1; }
4646
RLVER=10 bash sign-repos-only.sh

cron/stable-updates-8

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ if [ "$ret_val" -ne 0 ]; then
1313
1414
exit 1
1515
fi
16-
pushd /etc/pungi-prod/scripts
16+
pushd /etc/pungi-prod/scripts || { echo "Cron: Failed to change directory"; exit 1; }
1717
bash updates-8-full.sh
1818
ret_val=$?
19-
popd
19+
popd || { echo "Cron: Could not change back to original directory"; exit 1; }
2020

2121
if [ "$ret_val" -eq 0 ]; then
22-
pushd /root/toolkit/sync
22+
pushd /root/toolkit/sync || { echo "Cron: Failed to changte directory"; exit 1; }
2323
RLVER=8 bash sync-to-staging.sh Rocky-devel
2424
RLVER=8 bash sync-to-staging.sh Extras
2525
RLVER=8 bash sync-to-staging.sh Rocky
26-
popd
26+
popd || { echo "Cron: Could not change back to original directory"; exit 1; }
2727

28-
pushd /mnt/repos-staging/mirror/pub/rocky/8.10
28+
pushd /mnt/repos-staging/mirror/pub/rocky/8.10 || { echo "Cron: Directory doesn't exist"; exit 1; }
2929
python3.9 /usr/local/bin/apollo_tree -p $(pwd) -n 'Rocky Linux 8 $arch' -i Live -i Minimal -i devel -i extras -i images -i isos -i live -i metadata -i Devel -i plus -i nfv
30-
popd
30+
popd || { echo "Cron: Could not change back to original directory"; exit 1; }
3131

32-
pushd /root/toolkit/sync
32+
pushd /root/toolkit/sync || { echo "Cron: Failed to change directory"; exit 1; }
3333
RLVER=8 bash sign-repos-only.sh
34-
popd
34+
popd || { echo "Cron: Could not change back to original directory"; exit 1; }
3535
fi

0 commit comments

Comments
 (0)