Add detection of dependencies so APT doesn't try to install them if they're already there. #5

Closed
ja1dan wants to merge 1 commits from new into new

View File

@ -1,4 +1,12 @@
#!/bin/bash
need=""
unzip > /dev/null 2>&1 | need+="unzip "
plutil > /dev/null 2>&1 | need+="com.bingner.plutil "
zsh > /dev/null 2>&1 | need+="zsh "
curl > /dev/null 2>&1 | need+="curl "
if [ "$EUID" -ne 0 ]; then
echo You need to run this script as root.
else
@ -6,12 +14,11 @@ clear
echo -e "\e[31mWelcome to Uncursus Installation Script V1.3.2 (Stable) By @Yaya4_4 on Twitter.\e[0m"
echo "WARNING: I'M NOT RESPONSIBLE IF ANYTHING GOES WRONG"
echo "If you've found any bugs, please create an issue in GitHub."
echo "Installing Dependencies..."
apt update
apt install unzip -y
apt install com.bingner.plutil -y
apt install zsh -y
apt install curl -y
if [ $need != "" ]; then
echo "Installing Dependencies..."
apt update
apt install $need -y
fi
echo "Pulling and executing the Procursus deployment script..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Yaya48/Uncursus/new/procursus-deploy-u0.sh)"
echo "Pulling and installing official Procursus debians..."
@ -21,7 +28,7 @@ apt update
apt install wget -y --allow-unauthenticated
VER=$(/usr/bin/plutil -key ProductVersion /System/Library/CoreServices/SystemVersion.plist)
if [[ "${VER%.*}" -ge 12 ]] && [[ "${VER%.*}" -lt 13 ]]; then
echo "cock"
echo "Uncursus does not support iOS 12."
elif [[ "${VER%.*}" -ge 13 ]]; then
echo "iOS 13 Dectected Installing iOS 13 Procursus Deb"
wget https://github.com/Yaya48/Uncursus/blob/new/debprocursussystem-1600.zip?raw=true --directory-prefix=/User/Documents/uncursus/