Added flag.io plugin

usage: upload <file> [<file> ...]
This commit is contained in:
ushi 2012-12-22 08:57:29 +01:00
commit eb76f3582f

View file

@ -0,0 +1,15 @@
# Upload files to flag.io
upload() {
if [ $# -lt 1 ]; then
printf 'usage: upload <file> [<file> ...]\n'
return 1
fi
for path in $@; do
if [ -f "$path" ]; then
curl -sT "$path" flag.io | egrep -v '^#'
else
printf 'File not found: %s\n' "$path"
fi
done
}