forked from Samgisaninja/SuccessionRestore
-
Notifications
You must be signed in to change notification settings - Fork 13
/
compile
executable file
·58 lines (54 loc) · 2.1 KB
/
compile
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
#!/bin/sh
IP=$1
VERSION="1.1.2"
echo "COMPILING..."
rm -rf ./Divisé.app
rm -rf ./Build/Release-iphoneos/Divisé.app
rm -rf ./com.moski.Divise
xcodebuild -target Divisé -xcconfig compile64.xcconfig -configuration Release >> /dev/null
mv ./Build/Release-iphoneos/Divisé.app ./Divisé.app
echo "COMPILING SUCCDATROOT..."
cd ./succdatroot/ && make
cd ..
cp ./succdatroot/.theos/obj/debug/succdatroot ./Divisé.app/succdatroot
mv ./Divisé.app/succdatroot ./Divisé.app/succdatroot2
mv ./Divisé.app/succdatroot2/succdatroot ./Divisé.app/succdatroot
rm -rf ./Divisé.app/succdatroot2 ## This is annoying and badly done but it works
ldid -SEntitlements.plist ./Divisé.app/Divisé
rm -rf ./Divisé.app/attach
ldid -SEntitlements.plist ./Divisé.app/succdatroot
ldid -SEntitlements.plist ./Divisé.app/apfs_deletefs
ldid -SEntitlements.plist ./Divisé.app/hdik
rm -f ./Divisé.app/embedded.mobileprovision
mkdir ./com.moski.Divise
cp -r ./Template/* ./com.moski.Divise/
mkdir com.moski.Divise/Applications/
mv Divisé.app com.moski.Divise/Applications/
sudo fakeroot chmod 6755 com.moski.Divise/Applications/Divisé.app/Divisé
sudo fakeroot chmod 6755 com.moski.Divise/Applications/Divisé.app/succdatroot
sudo fakeroot chmod 0755 com.moski.Divise/Applications/Divisé.app/hdik
sudo fakeroot chmod 0755 com.moski.Divise/Applications/Divisé.app/apfs_deletefs
rm -rf ./Index
find . -type f -name .DS_Store -delete && xattr -cr *
sudo fakeroot dpkg-deb -Zgzip -b com.moski.Divise com.moski.Divise.$VERSION.deb
if [ -z "$IP" ]
then
echo "Getting ready for release!"
echo "Size:"
ls -la com.moski.Divise.$VERSION.deb
echo "md5:"
md5 com.moski.Divise.$VERSION.deb
echo "sha1:"
shasum -a 1 com.moski.Divise.$VERSION.deb
echo "sha256:"
shasum -a 256 com.moski.Divise.$VERSION.deb
echo "Done!"
exit
fi
echo "INSTALLING TO DEVICE"
echo "Trying to move deb to device"
scp com.moski.Divise.$VERSION.deb root@$IP:/tmp
echo "Trying to install deb"
ssh root@$IP "dpkg -i /tmp/com.moski.Divise.$VERSION.deb && uicache --path /Applications/Divisé.app/"
echo "Success!"
## Changes made by nobbele/4ppleCracker/moski