correction upgrade de la base
This commit is contained in:
parent
91d54ac412
commit
24aff2dd05
|
@ -11,17 +11,20 @@ script="$1"
|
|||
function clean_backups()
|
||||
{
|
||||
file=${1}
|
||||
bcks=($(ls ${file}_*))
|
||||
nbbck=$(expr ${#bcks[@]} - 2)
|
||||
ls ${file}_* > /dev/null 2>&1
|
||||
if [ $? = 0 ]; then
|
||||
bcks=($(ls ${file}_*))
|
||||
nbbck=$(expr ${#bcks[@]} - 2)
|
||||
|
||||
|
||||
if [[ ${nbbck} -gt 1 ]]
|
||||
then
|
||||
EchoGras "Cleaning up old backups !"
|
||||
for idx in `seq 0 ${nbbck}`
|
||||
do
|
||||
rm -f ${bcks[${idx}]}
|
||||
done
|
||||
if [[ ${nbbck} -gt 1 ]]
|
||||
then
|
||||
EchoGras "Cleaning up old backups !"
|
||||
for idx in `seq 0 ${nbbck}`
|
||||
do
|
||||
rm -f ${bcks[${idx}]}
|
||||
done
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue