blob: ef405e8d95c4b67879e882248fb9b3901a513d73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!/bin/bash
MYTH_RUN_STATUS=1
. /etc/profile
KeepBackups=4
for f in "/etc/lircd.conf" "/etc/lircrc" "/etc/lirc/lircd.conf.d/remote_lircd.conf" "/etc/wol-lircrc" "/etc/remote.run" "/etc/asound.conf"
do
NumBackups=`ls -d $f-* | wc -l`
if [[ $NumBackups -gt $KeepBackups ]]
then
echo "Deleting old $f-* files..."
numdel=$(($NumBackups-$KeepBackups))
rm -rf `ls -t $f-* | tail -$numdel`
fi
done
|