bugfix
authorAlex Kirhenshtein <alk@netxms.org>
Mon, 31 Jan 2005 01:28:10 +0000 (01:28 +0000)
committerAlex Kirhenshtein <alk@netxms.org>
Mon, 31 Jan 2005 01:28:10 +0000 (01:28 +0000)
tools/sharIt

index 2b124f2..b8e3318 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 trap '
-       rm tmp
+       rm -f tmp
 ' INT EXIT
 
 if [ "x"$3 = "x" ]; then
@@ -9,6 +9,8 @@ if [ "x"$3 = "x" ]; then
        exit
 fi
 
+[ -r $1 ] || echo "Can't read $1" && exit
+
 md5=`which md5`
 if [ $? != 0 ]; then
        md5=`which md5sum`