summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-08-11 18:27:01 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-08-11 18:27:01 +0200
commit8786eeac017c2247daebbcc57b0cf5594f25986a (patch)
tree2af0a2d005ed76f1b34a892ea595e59a30b6d4ea
parent3ec7aef28c5523d15f7c677ab29dfc30b3b5fc2f (diff)
make curlopts and useragent global variables
Needed for apikey patch. Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--fb.in7
1 files 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'"