X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=macos%2Fmacos.bash;h=fc49db9c2f68c3a30ebd9bf1aece77f97d5493f6;hb=04684bab21f6fa7be3404d0cf93fdd2af2ec564f;hp=6e7582f2ade3561e1f00d08a76a409f04234ec17;hpb=3c08ddc94be85d5dae0d4c40614812ee307eb545;p=webi-installers%2F.git diff --git a/macos/macos.bash b/macos/macos.bash index 6e7582f..fc49db9 100644 --- a/macos/macos.bash +++ b/macos/macos.bash @@ -14,32 +14,10 @@ set -e set -u -if [ -z "${WEBI_PKG_URL:-}" ]; then - # dmg - release_tab="${WEBI_HOST}/api/releases/macos@${WEBI_VERSION:-}.csv?os=$(uname -s)&arch=$(uname -m)&limit=1" - WEBI_CSV=$(curl -fsSL "$release_tab" -H "User-Agent: $(uname -a)") - WEBI_CHANNEL=$(echo $WEBI_CSV | cut -d ',' -f 3) - if [ "error" == "$WEBI_CHANNEL" ]; then - echo "could not find release for macOS v${WEBI_VERSION}" - exit 1 - fi - WEBI_VERSION=$(echo $WEBI_CSV | cut -d ',' -f 1) - WEBI_PKG_URL=$(echo $WEBI_CSV | cut -d ',' -f 9) -fi +webi_download -mkdir -p ~/Downloads pushd ~/Downloads 2>&1 >/dev/null -# TODO use downloads directory because this is big -set +e -if [ -n "$(command -v wget)" ]; then - # better progress bar - wget -c "${WEBI_PKG_URL}" -else - curl -fL "${WEBI_PKG_URL}" -o "$(echo "${WEBI_PKG_FILE}" | sed 's:.*/::' )" -fi -set -e - if [ "Darwin" == "$(uname -s)" ]; then curl -fsSL 'https://gist.githubusercontent.com/solderjs/8c36d132250163011c83bad8284975ee/raw/5a291955813743c20c12ca2d35c7b1bb34f8aecc/create-bootable-installer-for-os-x-el-capitan.sh' -o create-bootable-installer-for-os-x-el-capitan.sh bash create-bootable-installer-for-os-x-el-capitan.sh