scripts: fix buildtools script under windows git bash (#3145)

wget is nonfunctional in git bash for windows, so we should use curl instead
(no matter what you pass to wget it fails with the same error)

https://i.imgur.com/YDw68vM.png
This commit is contained in:
ThatGamerBlue 2020-04-09 15:05:21 +01:00 committed by GitHub
parent dcb69ddc73
commit e3574edc5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ is_installed() {
ensure_buildtools() {
if [ ! -f "BuildTools.jar" ]; then
echo "Downloading BuildTools..."
if [[ "$OSTYPE" == "darwin"* ]]; then
if [[ "$OSTYPE" == "darwin"* ]] || [[ "$OSTYPE" == "msys"* ]]; then
curl https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -o BuildTools.jar
else
wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar