Merge branch 'develop' into dist/eole/2.7.0/develop
This commit is contained in:
commit
09a8e23ba2
|
@ -11,17 +11,20 @@ script="$1"
|
||||||
function clean_backups()
|
function clean_backups()
|
||||||
{
|
{
|
||||||
file=${1}
|
file=${1}
|
||||||
bcks=($(ls ${file}_*))
|
ls ${file}_* > /dev/null 2>&1
|
||||||
nbbck=$(expr ${#bcks[@]} - 2)
|
if [ $? = 0 ]; then
|
||||||
|
bcks=($(ls ${file}_*))
|
||||||
|
nbbck=$(expr ${#bcks[@]} - 2)
|
||||||
|
|
||||||
|
|
||||||
if [[ ${nbbck} -gt 1 ]]
|
if [[ ${nbbck} -gt 1 ]]
|
||||||
then
|
then
|
||||||
EchoGras "Cleaning up old backups !"
|
EchoGras "Cleaning up old backups !"
|
||||||
for idx in `seq 0 ${nbbck}`
|
for idx in `seq 0 ${nbbck}`
|
||||||
do
|
do
|
||||||
rm -f ${bcks[${idx}]}
|
rm -f ${bcks[${idx}]}
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue