-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathinstall_script.sh
executable file
·67 lines (53 loc) · 1.6 KB
/
install_script.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Create dir for the tweak
mkdir -p $1.dir
OLD_PWD=$pwd
# Extract
#tar --lzma -xvf $1 -C $1.dir/
cd $1.dir
ar x ../$1
if [[ $(ls | grep data.tar.lzma ) ]]; then
tar --lzma -xvf data.tar.lzma
else
tar -xvf data.tar.*
fi
if find . | grep Library; then
cd Library/
# Sign using ldid (aka ldid2)
# for bin in $(for file in $(find . | grep -Ev ".*.png" | grep -Ev ".*.plist" | grep -Ev ".*.txt" | grep -Ev ".*.sh"); do file $file; done | grep -v directory | awk '{print $1}' | sed 's@:@@' | sort -u); do echo $bin; ldid -S "$bin"; done
# Copy to device
if find . | grep MobileSubstrate; then
scp -P 2222 MobileSubstrate/DynamicLibraries/* root@$2:/bootstrap/Library/SBInject/.
fi
if find . | grep PreferenceBundles; then
scp -P 2222 -r PreferenceBundles/*.bundle root@$2:/bootstrap/Library/PreferenceBundles/.
scp -P 2222 -r PreferenceLoader/Preferences/*.plist root@$2:/bootstrap/Library/PreferenceLoader/Preferences/.
fi
if find . | grep "Application Support"; then
cd "Application Support"
scp -P 2222 -r * root@$2:"/Library/Application\ Support/."
cd ..
fi
tweakleft=$(find . | grep -v MobileSubstrate | grep -v Preference | grep -v "Application Support" | tail -n +2)
echo "Tweak Left overs:"
echo "$tweakleft"
cd ../
else
echo "No Tweak Found"
fi
if find . | grep usr; then
cd usr/
# Copy to device
if find . | grep lib; then
scp -P 2222 -r lib/* root@$2:/bootstrap/usr/lib/.
fi
if find . | grep bin; then
scp -P 2222 -r bin/* root@$2:/bootstrap/usr/bin/.
fi
usrleft=$(find . | grep -v lib | grep -v bin | tail -n +2)
echo "usr Left overs:"
echo "$usrleft"
else
echo "No Libraries found"
fi
echo "Install Complete"
cd $OLD_PWD