diff options
-rwxr-xr-x | scripts/gist | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/gist b/scripts/gist index 4e2d311..b2767b1 100755 --- a/scripts/gist +++ b/scripts/gist | |||
@@ -142,8 +142,7 @@ _apply_config() { | |||
142 | _apply_config "$@" || exit 1 | 142 | _apply_config "$@" || exit 1 |
143 | 143 | ||
144 | ## This function determines which http get tool the system has installed and returns an error if there isnt one | 144 | ## This function determines which http get tool the system has installed and returns an error if there isnt one |
145 | getConfiguredClient() | 145 | getConfiguredClient() { |
146 | { | ||
147 | if command -v curl &>/dev/null; then | 146 | if command -v curl &>/dev/null; then |
148 | configuredClient="curl" | 147 | configuredClient="curl" |
149 | elif command -v wget &>/dev/null; then | 148 | elif command -v wget &>/dev/null; then |
@@ -159,8 +158,7 @@ getConfiguredClient() | |||
159 | } | 158 | } |
160 | 159 | ||
161 | ## Allows to call the users configured client without if statements everywhere | 160 | ## Allows to call the users configured client without if statements everywhere |
162 | httpGet() | 161 | httpGet() { |
163 | { | ||
164 | local header="" | 162 | local header="" |
165 | case "$configuredClient" in | 163 | case "$configuredClient" in |
166 | curl) [[ -n $token ]] && header="--header Authorization: token $token"; curl -A curl -s $header "$@" ;; | 164 | curl) [[ -n $token ]] && header="--header Authorization: token $token"; curl -A curl -s $header "$@" ;; |