setup-mingw-build.sh 801 Bytes
Newer Older
1 2 3
#!/bin/sh

set -ex
4 5 6 7 8

echo "##############################################################################"
echo "## Downloading mingw"
echo "##############################################################################"

9 10 11
BUILD_TEMP=${BUILD_TEMP:=$TEMP}
BUILD_TEMP=$(cygpath $BUILD_TEMP)

12 13
case "$ARCH" in
	amd64)
14
		MINGW_URI="https://github.com/libgit2/ci-dependencies/releases/download/2023-01-23/mingw-x86_64-8.1.0-release-win32-sjlj-rt_v6-rev0.zip";;
15
	x86)
16
		MINGW_URI="https://github.com/libgit2/ci-dependencies/releases/download/2023-01-23/mingw-i686-8.1.0-release-win32-sjlj-rt_v6-rev0.zip";;
17 18
esac

19 20 21 22 23 24 25 26 27
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"