blob: 97e0283177cbe13f5cea1e4083294602629fd46b (
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/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
|