Skip to content
This repository was archived by the owner on Apr 16, 2023. It is now read-only.

Commit 93bafed

Browse files
committed
Update restore_cydia.sh
1 parent afcbddd commit 93bafed

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

restore_cydia.sh

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
clear
5-
VER="1.0~2"
5+
VER="1.0~3"
66
echo "sourceutility restore_sileo v $VER"
77

88
DIRECTORY=`dirname $0`
@@ -34,6 +34,27 @@ if [[ $EUID -ne 0 ]]; then
3434
exit 1;
3535
fi
3636

37+
check_connection() {
38+
URL=$1
39+
echo $URL
40+
41+
ex() {
42+
echo "Could not connect to $URL..."
43+
read -p "Press [Enter] to continue..." fackEnterKey
44+
}
45+
cont() {
46+
echo "Connection to $URL returned no errors!"
47+
}
48+
echo "Checking ability to connect to '$URL'..."
49+
50+
case "$(curl -s --max-time 2 -I $URL | sed 's/^[^ ]* *\([0-9]\).*/\1/; 1q')" in
51+
[23]) cont ;;
52+
5) ex ;;
53+
*) ex;;
54+
esac
55+
56+
}
57+
3758
# Change directory to directory of current shell script
3859
cd $DIRECTORY
3960

@@ -66,7 +87,7 @@ pause
6687

6788
erase_tmp() {
6889
echo "Cleaning up..."
69-
rm tmp/
90+
rm -rf tmp/
7091
}
7192
reinstall_cydia() {
7293

0 commit comments

Comments
 (0)