summaryrefslogtreecommitdiff
path: root/azure-pipelines/setup-mingw.sh
diff options
context:
space:
mode:
Diffstat (limited to 'azure-pipelines/setup-mingw.sh')
-rwxr-xr-xazure-pipelines/setup-mingw.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/azure-pipelines/setup-mingw.sh b/azure-pipelines/setup-mingw.sh
index 1172c2077..d500da058 100755
--- a/azure-pipelines/setup-mingw.sh
+++ b/azure-pipelines/setup-mingw.sh
@@ -4,6 +4,9 @@ echo "##########################################################################
echo "## Downloading mingw"
echo "##############################################################################"
+BUILD_TEMP=${BUILD_TEMP:=$TEMP}
+BUILD_TEMP=$(cygpath $BUILD_TEMP)
+
case "$ARCH" in
amd64)
MINGW_URI="https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-x86_64-8.1.0-release-win32-seh-rt_v6-rev0.zip";;
@@ -11,5 +14,12 @@ case "$ARCH" in
MINGW_URI="https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-i686-8.1.0-release-win32-sjlj-rt_v6-rev0.zip";;
esac
-curl -s -L "$MINGW_URI" -o "$TEMP"/mingw-"$ARCH".zip
-unzip -q "$TEMP"/mingw-"$ARCH".zip -d "$TEMP"
+if [ -z "$MINGW_URI" ]; then
+ echo "No URL"
+ exit 1
+fi
+
+mkdir -p "$BUILD_TEMP"
+
+curl -s -L "$MINGW_URI" -o "$BUILD_TEMP"/mingw-"$ARCH".zip
+unzip -q "$BUILD_TEMP"/mingw-"$ARCH".zip -d "$BUILD_TEMP"