Merge branch 'master' of git.noarch.de:hardi/opt-cc into task/add-user-paging
commit
a9ce56a270
|
@ -29,17 +29,15 @@ do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $(ls -lt --hide=backup.sh | wc -l) -gt 6 ]; then
|
if [ $(ls -lt --hide=backup.sh | wc -l) -gt 14 ]; then
|
||||||
$(rm "$(ls -t --hide=backup.sh | tail -1)")
|
$(rm "$(ls -t --hide=backup.sh | tail -1)")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$1" ]
|
if [ -z "$1" ]
|
||||||
then
|
then
|
||||||
tar -zcf ${DATE}.tar.gz ${DATE}
|
tar -zcf ${DATE}.tar.gz ${DATE}
|
||||||
fi
|
rm -rf ${DATE}
|
||||||
|
elif [[ $1 =~ ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$ ]]
|
||||||
# to avoid file deletion, if date to apply is entered with .tar.gz ending
|
|
||||||
if [[ $1 =~ ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$ ]]
|
|
||||||
then
|
then
|
||||||
rm -rf ${DATE}
|
rm -rf ${DATE}
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue