Add checks for dependencies. #6

Closed
ja1dan wants to merge 1 commits from beta into beta

View File

@ -2,6 +2,12 @@
if [ "$EUID" -ne 0 ]; then if [ "$EUID" -ne 0 ]; then
echo You need to run this script as root. echo You need to run this script as root.
else else
need=""
command -v unzip >/dev/null 2>&1 || need+="unzip "
command -v plutil >/dev/null 2>&1 || need+="com.bingner.plutil "
command -v curl >/dev/null 2>&1 || need+="curl "
clear clear
echo -e "\e[31mWelcome to Uncursus Installation Script V2.0.0 (Beta3) By @Yaya4_4 on Twitter.\e[0m" echo -e "\e[31mWelcome to Uncursus Installation Script V2.0.0 (Beta3) By @Yaya4_4 on Twitter.\e[0m"
echo "Checking If Is A Clean Install Of Unc0ver..." echo "Checking If Is A Clean Install Of Unc0ver..."
@ -15,11 +21,11 @@ exit 1
fi fi
echo "WARNING: I'M NOT RESPONSIBLE IF ANYTHING GOES WRONG" echo "WARNING: I'M NOT RESPONSIBLE IF ANYTHING GOES WRONG"
echo "If you've found any bugs, please create an issue in GitHub." echo "If you've found any bugs, please create an issue in GitHub."
if [ $need != "" ]; then
echo "Installing Dependencies..." echo "Installing Dependencies..."
apt update apt update
apt install unzip -y apt install $need -y
apt install com.bingner.plutil -y fi
apt install curl -y
echo "Pulling and executing the Procursus Migration Script" echo "Pulling and executing the Procursus Migration Script"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Yaya48/Uncursus/beta/procursus-migration.sh)" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Yaya48/Uncursus/beta/procursus-migration.sh)"
echo "Done. Creating a custom directory for the required files. Path (/User/Documents/uncursus)." echo "Done. Creating a custom directory for the required files. Path (/User/Documents/uncursus)."