summaryrefslogtreecommitdiffstats
path: root/fb.in
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-01-09 16:56:51 +0100
committerFlorian Pritz <bluewind@xinu.at>2013-01-09 16:56:51 +0100
commit1aa1cbf8e5bc134b620ed153534b4891195d4b55 (patch)
tree396206ddb32d5afd78116f92ec385cbb2202d5b6 /fb.in
parente9d946a17642cb2f1565e90490772c7985484e9d (diff)
fb-helper: Use getopt
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'fb.in')
-rw-r--r--fb.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/fb.in b/fb.in
index b21a83c..ce56a6d 100644
--- a/fb.in
+++ b/fb.in
@@ -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"