local file upload fix

This commit is contained in:
Jack L. Frost 2014-10-04 13:35:24 +04:00
parent 4f06fec784
commit 845b13cd64

6
sup
View File

@ -142,14 +142,16 @@ main() {
else
target="${args[0]}"; [[ "$target" ]] || { sup.usage; exit 1; }
sup.if_url "$target" && {
if sup.if_url "$target"; then
file=`sup.mktemp "$cfg_tmp_dir"`
curl -s "$target" > "$file" || {
sup.err "Could not download file."
return 1
}
}
else
file="$target"
fi
fi
sup.upload