Fixed integer checking of -s param

This commit is contained in:
Anathema 2011-08-28 16:54:00 +02:00 committed by boyska
parent 3fe53affc9
commit f2ba4136b8

View File

@ -353,7 +353,12 @@ create_tomb() {
tombname=${tombfile%%\.*}
tombfile=${tombname}.tomb
tombsize=$opts[-s]
if [[ $tombsize != <-> ]]; then
error "Size is not an integer"
return 1
fi
if [ -e ${tombdir}/${tombfile} ]; then
error "tomb exists already. I'm not digging here:"
ls -lh ${tombdir}/${tombfile}