Merge pull request #3683 from MikeMcQuaid/vendor-install-mirror
vendor-install: various portable ruby tweaks.
This commit is contained in:
commit
fcec5ad360
@ -8,26 +8,26 @@ source "$HOMEBREW_LIBRARY/Homebrew/utils/lock.sh"
|
|||||||
|
|
||||||
VENDOR_DIR="$HOMEBREW_LIBRARY/Homebrew/vendor"
|
VENDOR_DIR="$HOMEBREW_LIBRARY/Homebrew/vendor"
|
||||||
|
|
||||||
# Built from https://github.com/Homebrew/homebrew-portable.
|
# Built from https://github.com/Homebrew/homebrew-portable-ruby.
|
||||||
if [[ -n "$HOMEBREW_MACOS" ]]
|
if [[ -n "$HOMEBREW_MACOS" ]]
|
||||||
then
|
then
|
||||||
if [[ "$HOMEBREW_PROCESSOR" = "Intel" ]]
|
if [[ "$HOMEBREW_PROCESSOR" = "Intel" ]]
|
||||||
then
|
then
|
||||||
ruby_URL="https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz"
|
ruby_URL="https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz"
|
||||||
|
ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.3.3/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz"
|
||||||
ruby_SHA="34ce9e4c9c1be28db564d744165aa29291426f8a3d2ef806ba4f0b9175aedb2b"
|
ruby_SHA="34ce9e4c9c1be28db564d744165aa29291426f8a3d2ef806ba4f0b9175aedb2b"
|
||||||
else
|
|
||||||
ruby_URL=""
|
|
||||||
ruby_SHA=""
|
|
||||||
fi
|
fi
|
||||||
elif [[ -n "$HOMEBREW_LINUX" ]]
|
elif [[ -n "$HOMEBREW_LINUX" ]]
|
||||||
then
|
then
|
||||||
case "$HOMEBREW_PROCESSOR" in
|
case "$HOMEBREW_PROCESSOR" in
|
||||||
armv7l)
|
armv7l)
|
||||||
ruby_URL="https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.armv7l_linux.bottle.1.tar.gz"
|
ruby_URL="https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.3.3.armv7l_linux.bottle.1.tar.gz"
|
||||||
|
ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.3.3/portable-ruby-2.3.3.armv7l_linux.bottle.1.tar.gz"
|
||||||
ruby_SHA="d26affe6f6ac299557a9044b311b4066b554874fc828ebc323d2705d3f4a8249"
|
ruby_SHA="d26affe6f6ac299557a9044b311b4066b554874fc828ebc323d2705d3f4a8249"
|
||||||
;;
|
;;
|
||||||
x86_64)
|
x86_64)
|
||||||
ruby_URL="https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.x86_64_linux.bottle.1.tar.gz"
|
ruby_URL="https://homebrew.bintray.com/bottles-portable-ruby/portable-ruby-2.3.3.x86_64_linux.bottle.1.tar.gz"
|
||||||
|
ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.3.3/portable-ruby-2.3.3.x86_64_linux.bottle.1.tar.gz"
|
||||||
ruby_SHA="33643b1ca6f860d6df01686636326785763e5e81cf0cef37d8a7ab96a6ca1fa1"
|
ruby_SHA="33643b1ca6f860d6df01686636326785763e5e81cf0cef37d8a7ab96a6ca1fa1"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -90,7 +90,20 @@ fetch() {
|
|||||||
|
|
||||||
if [[ ! -f "$temporary_path" ]]
|
if [[ ! -f "$temporary_path" ]]
|
||||||
then
|
then
|
||||||
odie "Download failed: $VENDOR_URL"
|
[[ -n "$HOMEBREW_QUIET" ]] || echo "==> Downloading $VENDOR_URL2" >&2
|
||||||
|
"$HOMEBREW_CURL" "${curl_args[@]}" "$VENDOR_URL2" -o "$temporary_path"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f "$temporary_path" ]]
|
||||||
|
then
|
||||||
|
odie <<EOS
|
||||||
|
Failed to download $VENDOR_URL and $VENDOR_URL2!
|
||||||
|
|
||||||
|
Do not file an issue on GitHub about this: you will need to figure out for
|
||||||
|
yourself what issue with your internet connection restricts your access to
|
||||||
|
both Bintray (used for Homebrew bottles/binary packages) and GitHub
|
||||||
|
(used for Homebrew updates).
|
||||||
|
EOS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap '' SIGINT
|
trap '' SIGINT
|
||||||
@ -211,8 +224,10 @@ homebrew-vendor-install() {
|
|||||||
[[ -n "$HOMEBREW_DEBUG" ]] && set -x
|
[[ -n "$HOMEBREW_DEBUG" ]] && set -x
|
||||||
|
|
||||||
url_var="${VENDOR_NAME}_URL"
|
url_var="${VENDOR_NAME}_URL"
|
||||||
|
url2_var="${VENDOR_NAME}_URL2"
|
||||||
sha_var="${VENDOR_NAME}_SHA"
|
sha_var="${VENDOR_NAME}_SHA"
|
||||||
VENDOR_URL="${!url_var}"
|
VENDOR_URL="${!url_var}"
|
||||||
|
VENDOR_URL2="${!url2_var}"
|
||||||
VENDOR_SHA="${!sha_var}"
|
VENDOR_SHA="${!sha_var}"
|
||||||
|
|
||||||
if [[ -z "$VENDOR_URL" || -z "$VENDOR_SHA" ]]
|
if [[ -z "$VENDOR_URL" || -z "$VENDOR_SHA" ]]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user