diff options
Diffstat (limited to 'vendor/mdbook/ci/install-hub.sh')
-rwxr-xr-x | vendor/mdbook/ci/install-hub.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/vendor/mdbook/ci/install-hub.sh b/vendor/mdbook/ci/install-hub.sh new file mode 100755 index 000000000..38da2c8cb --- /dev/null +++ b/vendor/mdbook/ci/install-hub.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +# Installs the `hub` executable into hub/bin +set -ex +case $1 in + ubuntu*) + curl -LsSf https://github.com/github/hub/releases/download/v2.12.8/hub-linux-amd64-2.12.8.tgz -o hub.tgz + mkdir hub + tar -xzvf hub.tgz --strip=1 -C hub + ;; + macos*) + curl -LsSf https://github.com/github/hub/releases/download/v2.12.8/hub-darwin-amd64-2.12.8.tgz -o hub.tgz + mkdir hub + tar -xzvf hub.tgz --strip=1 -C hub + ;; + windows*) + curl -LsSf https://github.com/github/hub/releases/download/v2.12.8/hub-windows-amd64-2.12.8.zip -o hub.zip + 7z x hub.zip -ohub + ;; + *) + echo "OS should be first parameter, was: $1" + ;; +esac + +echo "$PWD/hub/bin" >> $GITHUB_PATH |