From 8786eeac017c2247daebbcc57b0cf5594f25986a Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 11 Aug 2013 18:27:01 +0200 Subject: make curlopts and useragent global variables Needed for apikey patch. Signed-off-by: Florian Pritz --- fb.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fb.in b/fb.in index cc79e21..762eb88 100644 --- a/fb.in +++ b/fb.in @@ -50,6 +50,8 @@ display_history= clipboard="" exitcode=0 debug= +useragent="fb-client/shell-$version" +default_curlopts="-# -L -A $useragent --speed-time 30 --speed-limit 1 --connect-timeout 10" base64_encode() { if type base64 2>&1 >/dev/null; then @@ -88,8 +90,9 @@ request_helper() { $libdir/fb-helper $helperopts -u "$url" -f "$file" fi else - useragent="fb-client/shell-$version" - curlopts="-# -L -A $useragent --speed-time 30 --speed-limit 1 --connect-timeout 10" + curlopts="$default_curlopts" + + require_executable curl if [ -e "$apikey_file" ]; then curlopts="$curlopts --data-urlencode 'apikey@$apikey_file'" -- cgit v1.2.3-24-g4f1b