From 0bc60cc2cc2225b6b17ebc07fb814d5fd3e5aef1 Mon Sep 17 00:00:00 2001 From: typebrook Date: Sat, 1 Feb 2020 11:39:36 +0800 Subject: update --- scripts/gist | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/gist b/scripts/gist index 4e2d311..b2767b1 100755 --- a/scripts/gist +++ b/scripts/gist @@ -142,8 +142,7 @@ _apply_config() { _apply_config "$@" || exit 1 ## This function determines which http get tool the system has installed and returns an error if there isnt one -getConfiguredClient() -{ +getConfiguredClient() { if command -v curl &>/dev/null; then configuredClient="curl" elif command -v wget &>/dev/null; then @@ -159,8 +158,7 @@ getConfiguredClient() } ## Allows to call the users configured client without if statements everywhere -httpGet() -{ +httpGet() { local header="" case "$configuredClient" in curl) [[ -n $token ]] && header="--header Authorization: token $token"; curl -A curl -s $header "$@" ;; -- cgit v1.2.3-70-g09d2