From c7c302cced01104a2fc57f4e0d22264022d8cf30 Mon Sep 17 00:00:00 2001 From: Yaya4 <34249303+Yaya48@users.noreply.github.com> Date: Sat, 5 Sep 2020 20:26:08 +0200 Subject: [PATCH] add some dependencies check --- procursus-migration.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/procursus-migration.sh b/procursus-migration.sh index 33118ae..990255c 100644 --- a/procursus-migration.sh +++ b/procursus-migration.sh @@ -4,7 +4,7 @@ echo You need to run this script as root. else clear echo "Copyright (c) 2020, Yaya4 All rights reserved." -echo -e "\e[31mUncursus 2.0 Migration Part By Yaya4_4 1.2.2-2 (Stable)\e[0m" +echo -e "\e[31mUncursus 2.0 Migration Part By Yaya4_4 1.2.2-3 (Stable)\e[0m" checkiOSVersion(){ echo "Checking iOS Version ..." VER=$(/usr/bin/plutil -key ProductVersion /System/Library/CoreServices/SystemVersion.plist) @@ -27,8 +27,14 @@ fi } checkDependencies(){ echo "Checking Dependencies ..." +need2 ="" +command -v wget >/dev/null 2>&1 || need2+="wget " +command -v plutil >/dev/null 2>&1 || need2+="com.bingner.plutil " +if [[ $need != "" ]]; then +echo "Installing Dependencies..." apt update -apt install wget -y --allow-unauthenticated +apt install $need -y +fi } checkSileo(){ echo "Checking if sileo for checkrain is installed ..."