From f2ba4136b8295dff54b34585e09b4f70c3b327ed Mon Sep 17 00:00:00 2001 From: Anathema Date: Sun, 28 Aug 2011 16:54:00 +0200 Subject: [PATCH] Fixed integer checking of -s param --- src/tomb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tomb b/src/tomb index 0a4aed6..901105c 100755 --- 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}