commit f2ba4136b8295dff54b34585e09b4f70c3b327ed
parent 3fe53affc98e02ffa807367a93def1bd242fc4fd
Author: Anathema <anathema@anche.no>
Date: Sun, 28 Aug 2011 16:54:00 +0200
Fixed integer checking of -s param
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/tomb b/src/tomb
@@ -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}