From 0554803ef373d699f81412a838cf78d36ce1015f Mon Sep 17 00:00:00 2001 From: Pakobbix Date: Thu, 2 Mar 2023 13:59:49 +0100 Subject: [PATCH] added Check if zip is available --- wiremac.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/wiremac.sh b/wiremac.sh index 2f560de..7b32f76 100644 --- a/wiremac.sh +++ b/wiremac.sh @@ -4,8 +4,16 @@ wireguardzip="https://gitea.zephyre.one/Pakobbix/quick_wireguardtest/raw/branch/main/Wireguard.app.zip" -curl -s $wireguardzip -O "Wireguard.app.zip" - +if [ -f Wireguard.app.zip ]; then + echo "Zip bereits vorhanden, überspringe download" +else + if curl -s $wireguardzip -O "Wireguard.app.zip"; then + echo "Download beendet" + else + echo "Download hatte nicht funktioniert, bitte manuell herunterladen:" + echo "$wireguardzip" + fi +fi unzip WireGuard.app.zip -d /Applications/ sudo chown -R root:wheel /Applications/WireGuard.app