From 38e05b5f4c1199ac08f1630a502429cf79594304 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sun, 13 Jun 2021 11:07:19 +0100 Subject: [PATCH] Download wintun on first pass --- contrib/msi/build-msi.sh | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/contrib/msi/build-msi.sh b/contrib/msi/build-msi.sh index 001de313..72fd0733 100644 --- a/contrib/msi/build-msi.sh +++ b/contrib/msi/build-msi.sh @@ -74,19 +74,22 @@ PKGVERSIONMS=$(echo $PKGVERSION | tr - .) PKGGUID="54a3294e-a441-4322-aefb-3bb40dd022bb" PKGINSTFOLDER="ProgramFilesFolder" # Download the Wintun driver -curl -o wintun.zip https://www.wintun.net/builds/wintun-0.11.zip -unzip wintun.zip -if [ $PKGARCH = "x64" ]; then - PKGWINTUNDLL=wintun/bin/amd64/wintun.dll -elif [ $PKGARCH = "x86" ]; then - PKGWINTUNDLL=wintun/bin/x86/wintun.dll -elif [ $PKGARCH = "arm" ]; then - PKGWINTUNDLL=wintun/bin/arm/wintun.dll -#elif [ $PKGARCH = "arm64" ]; then -# PKGWINTUNDLL=wintun/bin/arm64/wintun.dll -else - echo "wasn't sure which architecture to get wintun for" - exit 1 +if [ ! -d wintun ]; +then + curl -o wintun.zip https://www.wintun.net/builds/wintun-0.11.zip + unzip wintun.zip + if [ $PKGARCH = "x64" ]; then + PKGWINTUNDLL=wintun/bin/amd64/wintun.dll + elif [ $PKGARCH = "x86" ]; then + PKGWINTUNDLL=wintun/bin/x86/wintun.dll + elif [ $PKGARCH = "arm" ]; then + PKGWINTUNDLL=wintun/bin/arm/wintun.dll + #elif [ $PKGARCH = "arm64" ]; then + # PKGWINTUNDLL=wintun/bin/arm64/wintun.dll + else + echo "wasn't sure which architecture to get wintun for" + exit 1 + fi fi if [ $PKGNAME != "master" ]; then