Renamed $path into $file

This commit is contained in:
ushi 2013-01-02 20:47:22 +01:00
commit 2cc3c5bf37

View file

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