summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfb10
1 files changed, 9 insertions, 1 deletions
diff --git a/fb b/fb
index 06dd87e..bd4d2b5 100755
--- a/fb
+++ b/fb
@@ -11,7 +11,7 @@
# Optional: xclip
#----------------------------------------------------
-VERSION="0.6.1"
+VERSION="0.6.2"
DELETE=0
EXTENSION=""
@@ -63,6 +63,7 @@ done
shift $((OPTIND - 1))
TMPDIR="$(mktemp -d "/tmp/fb.XXXXXX")"
+trap "rm -rf '${TMPDIR}'" EXIT INT TERM
if (($# == 0)); then
read_stdin "$TMPDIR/stdin"
@@ -73,8 +74,15 @@ else
curl -n -L "$PASTEBIN/file/delete/$i"
elif [[ $GET == 1 ]]; then
curl -s -o - "$PASTEBIN/$i"
+ elif [[ $i =~ ^(f|ht)tp(s)?://.+ ]]; then
+ cd $TMPDIR
+ curl -# -O "$i"
+ for f in *; do
+ do_upload "$f" && rm -f "$f"
+ done
else
do_upload $i
fi
done
fi
+