Skip to content

Commit 70fc526

Browse files
committed
add changelog cleanup
1 parent 626c7b5 commit 70fc526

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

cron/changelog-cleanup

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
pushd /mnt/koji/compose/logs || { echo "Could not find the logs"; exit 1; }
4+
5+
# We'll look for 10 days instead of just 7 days.
6+
SRCS=$(find . -maxdepth 1 -type f -mtime +10)
7+
8+
printf "The following will be deleted\n"
9+
for x in $SRCS ; do echo ${x} ; done
10+
11+
/bin/rm ${SRCS}
12+
popd || { echo "We couldn't leave?"; exit 1; }

cron/stable-cleanup-10

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22

3-
pushd /mnt/koji/compose/10/
3+
pushd /mnt/koji/compose/10/ || { echo "Could not change directories"; exit 1; }
44

55
SRCS=$(find . -maxdepth 1 -type d -mtime +7 | grep -vE 'SIG-|Rocky-10.[0-9]+-20[2-3][0-9]' | sort)
66

77
printf "The following will be deleted\n"
88
for x in $SRCS ; do echo ${x} ; done
99

10-
rm -rf ${SRCS}
10+
rm -rf ${SRCS} || { echo "Could not switch back"; exit 1; }

cron/stable-cleanup-8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22

3-
pushd /mnt/compose/8
3+
pushd /mnt/compose/8 || { echo "Could not change directories"; exit 1; }
44

55
SRCS=$(find . -maxdepth 1 -type d -mtime +7 | grep -vE 'SIG-|Rocky-8.10-2024' | sort)
66

77
printf "The following will be deleted\n"
88
for x in $SRCS ; do echo ${x} ; done
99

10-
rm -rf ${SRCS}
10+
rm -rf ${SRCS} || { echo "Could not switch back"; exit 1; }

cron/stable-cleanup-9

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22

3-
pushd /mnt/koji/compose/9/
3+
pushd /mnt/koji/compose/9/ || { echo "Could not change directories"; exit 1; }
44

55
SRCS=$(find . -maxdepth 1 -type d -mtime +7 | grep -vE 'SIG-|Rocky-9.[0-9]+-20[2-3][0-9]' | sort)
66

77
printf "The following will be deleted\n"
88
for x in $SRCS ; do echo ${x} ; done
99

10-
rm -rf ${SRCS}
10+
rm -rf ${SRCS} || { echo "Could not switch back"; exit 1; }

0 commit comments

Comments
 (0)