extract common code, add download for darwin

This commit is contained in:
Bryson Steck 2022-06-04 16:15:48 -06:00
parent 3fe62597a0
commit e28ec48dda

View file

@ -63,20 +63,20 @@ if [[ ERROR -ne 0 ]]; then
else else
echo "ERROR: Your system's architecture ($arch) does not support Wiimm's ISO Tools. Please refer to wit's website for more information on how to install the tools. https://wit.wiimm.de/" echo "ERROR: Your system's architecture ($arch) does not support Wiimm's ISO Tools. Please refer to wit's website for more information on how to install the tools. https://wit.wiimm.de/"
fi fi
tar -xvf wit.tar.gz
cd wit-v*/
echo "You will now be prompted to enter your password for sudo in order for wit to install."
sudo ./install.sh
cd ..
rm -rf wit-v*/
elif [[ "$OSTYPE" == "darwin"* ]]; then elif [[ "$OSTYPE" == "darwin"* ]]; then
break wget https://wit.wiimm.de/download/wit-v3.04a-r8427-mac.tar.gz -O wit.tar.gz
elif [[ "$OSTYPE" == "cygwin" ]]; then elif [[ "$OSTYPE" == "cygwin" ]]; then
break break
else else
echo "Riibalanced Patcher: Your operating system ($OSTYPE) does not support Wiimm's ISO Tools. Please refer to wit's website for more information on how to install the tools. https://wit.wiimm.de/" echo "Riibalanced Patcher: Your operating system ($OSTYPE) does not support Wiimm's ISO Tools. Please refer to wit's website for more information on how to install the tools. https://wit.wiimm.de/"
exit 2; exit 2;
fi fi
tar -xvf wit.tar.gz
cd wit-v*/
echo "You will now be prompted to enter your password for sudo in order for wit to install."
sudo ./install.sh
cd ..
rm -rf wit-v*/
# check if wit is installed now # check if wit is installed now
type wit type wit
ERROR="$?" ERROR="$?"