Last active
February 5, 2018 15:03
-
-
Save khorevaa/acceb7df57a4617071b8fd9292dfb66e to your computer and use it in GitHub Desktop.
Установка bashfull
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
TAR_FILE="/tmp/bashful.tar.gz" | |
RELEASES_URL="https://github.com/wagoodman/bashful/releases" | |
test -z "$TMPDIR" && TMPDIR="$(mktemp -d)" | |
last_version() { | |
curl -sL -o /dev/null -w %{url_effective} "$RELEASES_URL/latest" | | |
rev | | |
cut -f1 -d'/'| | |
rev | |
} | |
download() { | |
test -z "$VERSION" && VERSION="$(last_version)" | |
test -z "$VERSION" && { | |
echo "Unable to get bashful version." >&2 | |
exit 1 | |
} | |
rm -f "$TAR_FILE" | |
curl -s -L -o "$TAR_FILE" \ | |
"$RELEASES_URL/download/$VERSION/bashful_$VERSION_linux_amd64.tar.gz" | |
echo "$RELEASES_URL/download/$VERSION/bashful_$VERSION_linux_amd64.tar.gz" | |
#"$RELEASES_URL/download/$VERSION/bashful$(uname -s)_$(uname -m).tar.gz" | |
} | |
download | |
tar -xf "$TAR_FILE" -C "$TMPDIR" | |
"${TMPDIR}/bashful" "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test -n "$TRAVIS_TAG" && curl -sL https://gist.githubusercontent.com/khorevaa/acceb7df57a4617071b8fd9292dfb66e/raw/a194ce34465a303678f18a8bc8d50d6208f1a106/install_bashful.sh | bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment