blob: 0a872012beacee402d59f0eda7602ce651e0dbd2 (
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/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
|