From 8b89910d2c38ec5610cbcd07d7065f1c6e40d0c2 Mon Sep 17 00:00:00 2001 From: CerberusV1 Date: Sat, 12 Oct 2024 14:09:57 +0200 Subject: [PATCH] downloading installer --- deploy.sh | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/deploy.sh b/deploy.sh index 0488d61..608ec6e 100755 --- a/deploy.sh +++ b/deploy.sh @@ -144,9 +144,25 @@ echo "Give the minecraft and forge version in following format:" echo "mc.version-forge.version e.g.: 1.20.1-47.3.0" read -p "Version: " version -echo $version # Logging output -sleep 1 +# echo $version # Logging output +# sleep 1 + # Building installer download URL URL="https://maven.minecraftforge.net/net/minecraftforge/forge/${version}/forge-${version}-installer.jar" +# echo $URL # Logging output -echo $URL # Logging output \ No newline at end of file + +# -------------------------------------------------------- +# Downloading Installer +# -------------------------------------------------------- + +echo "Downloading Installer" +wget "$server_dir" "$URL" > /dev/null 2>&1 & # no output for wget +PID=$! +( + while kill -0 $PID 2> /dev/null; do + echo "Downloading....." + sleep 1 + done + echo "Download finished." +) && \ No newline at end of file