summaryrefslogtreecommitdiffstats
path: root/fb.in
diff options
context:
space:
mode:
Diffstat (limited to 'fb.in')
-rw-r--r--fb.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/fb.in b/fb.in
index 48dc777..f6877ae 100644
--- a/fb.in
+++ b/fb.in
@@ -31,6 +31,13 @@ do_upload() {
file="$1"
basefilename="`basename -- "$file"`"
basedirname="`dirname -- "$file"`"
+
+ if [ ! -e "$file" ]; then
+ echo "Error: File \"$file\" doesn't exist" >&2
+ EXITCODE=1
+ return 1
+ fi
+
if [ -d "$file" ]; then
cd "$basedirname"
tar $TAROPTS -cf "$TMPDIR/$basefilename$TAREXT" -- "$basefilename"