forked from BandarHL/BHTwitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·83 lines (68 loc) · 2.51 KB
/
build.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
LONG=sideloaded:,rootless:,trollstore
OPTS=$(getopt -a weather --longoptions "$LONG" -- "$@")
while :; do
case "$1" in
--sideloaded)
echo -e '\033[1m\033[32mBuilding BHTwitter project for sideloaded.\033[0m'
make clean
rm -rf .theos
make SIDELOADED=1
if [ $? -eq 0 ]; then
echo -e '\033[1m\033[32mMake command succeeded.\033[0m'
else
echo -e '\033[1m\033[31mMake command failed.\033[0m'
exit 1
fi
if [ -e ./packages/com.atebits.Tweetie2.ipa ]; then
echo -e '\033[1m\033[32mBuilding the IPA.\033[0m'
cyan -i packages/com.atebits.Tweetie2.ipa -o packages/BHTwitter-sideloaded --ignore-encrypted \
-uwf .theos/obj/debug/keychainfix.dylib .theos/obj/debug/libbhFLEX.dylib \
.theos/obj/debug/BHTwitter.dylib layout/Library/Application\ Support/BHT/BHTwitter.bundle
echo -e '\033[1m\033[32mDone, thanks for using BHTwitter.\033[0m'
else
echo -e '\033[1m\033[0;31mpackages/com.atebits.Tweetie2.ipa not found.\033[0m'
fi
break
;;
--rootless)
echo -e '\033[1m\033[32mBuilding BHTwitter project for Rootless.\033[0m'
make clean
rm -rf .theos
export THEOS_PACKAGE_SCHEME=rootless
make package
echo -e '\033[1m\033[32mDone, thanks for using BHTwitter.\033[0m'
break
;;
--trollstore)
echo -e '\033[1m\033[32mBuilding BHTwitter project for TrollStore.\033[0m'
make clean
rm -rf .theos
make
if [ $? -eq 0 ]; then
echo -e '\033[1m\033[32mMake command succeeded.\033[0m'
else
echo -e '\033[1m\033[31mMake command failed.\033[0m'
exit 1
fi
if [ -e ./packages/com.atebits.Tweetie2.ipa ]; then
echo -e '\033[1m\033[32mBuilding the IPA.\033[0m'
cyan -i packages/com.atebits.Tweetie2.ipa -o packages/BHTwitter-trollstore.tipa --ignore-encrypted \
-uwf .theos/obj/debug/BHTwitter.dylib .theos/obj/debug/libbhFLEX.dylib layout/Library/Application\ Support/BHT/BHTwitter.bundle
echo -e '\033[1m\033[32mDone, thanks for using BHTwitter.\033[0m'
else
echo -e '\033[1m\033[0;31mpackages/com.atebits.Tweetie2.ipa not found.\033[0m'
fi
break
;;
*)
echo -e '\033[1m\033[32mBuilding BHTwitter project for Rootfull.\033[0m'
make clean
rm -rf .theos
unset THEOS_PACKAGE_SCHEME
make package
echo -e '\033[1m\033[32mDone, thanks for using BHTwitter.\033[0m'
break
;;
esac
done