Skip to content

Commit

Permalink
make CURL_USER_AGENT overrideable
Browse files Browse the repository at this point in the history
- e.g. by travis-ci running
  • Loading branch information
MartinNowak committed May 15, 2016
1 parent 9beade8 commit 55ea050
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions script/install.sh
Expand Up @@ -31,11 +31,11 @@ fatal() {
}

curl() {
: ${curl_user_agent:="installer/install.sh $(command curl --version | head -n 1)"}
: ${CURL_USER_AGENT:="installer/install.sh $(command curl --version | head -n 1)"}
if [ "$verbosity" -gt 0 ]; then
command curl -f#L --retry 3 -A "${curl_user_agent}" "$@"
command curl -f#L --retry 3 -A "$CURL_USER_AGENT" "$@"
else
command curl -fsSL --retry 3 -A "${curl_user_agent}" "$@"
command curl -fsSL --retry 3 -A "$CURL_USER_AGENT" "$@"
fi
}

Expand Down

0 comments on commit 55ea050

Please sign in to comment.