diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-01-09 16:56:51 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-01-09 16:56:51 +0100 |
commit | 1aa1cbf8e5bc134b620ed153534b4891195d4b55 (patch) | |
tree | 396206ddb32d5afd78116f92ec385cbb2202d5b6 /fb.in | |
parent | e9d946a17642cb2f1565e90490772c7985484e9d (diff) |
fb-helper: Use getopt
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'fb.in')
-rw-r--r-- | fb.in | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -66,7 +66,15 @@ request_helper() { # if available use the external helper, else fall back to calling curl if [ -x "$libdir/fb-helper" ]; then - $libdir/fb-helper "$mode" "$url" "$file" + helperopts="" + + if [ "$mode" = "d" ]; then + $libdir/fb-helper $helperopts -u "$url" + fi + + if [ "$mode" = "u" ]; then + $libdir/fb-helper $helperopts -u "$url" -f "$file" + fi else useragent="fb-client/shell-$version" curlopts="-# -n -L -A $useragent --speed-time 30 --speed-limit 1 --connect-timeout 10" |