forked from j-hc/revanced-magisk-module
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·55 lines (44 loc) · 893 Bytes
/
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
#!/bin/bash
set -euo pipefail
source build.conf
source utils.sh
print_usage() {
echo -e "Usage:\n${0} build|clean|reset-template"
}
if [ -z ${1+x} ]; then
print_usage
exit 0
elif [ "$1" = "clean" ]; then
rm -rf ./temp ./revanced-cache ./*.jar ./*.apk ./*.zip build.log
reset_template
exit 0
elif [ "$1" = "reset-template" ]; then
reset_template
exit 0
elif [ "$1" = "build" ]; then
:
else
print_usage
exit 1
fi
: >build.log
log "$(date +'%Y-%m-%d')\n"
mkdir -p "$BUILD_DIR"
if [ "$UPDATE_PREBUILTS" = true ]; then
get_prebuilts
else
set_prebuilts
fi
if [ "$BUILD_YT" = true ]; then
build_yt "$YT_PATCHER_ARGS"
fi
if [ "$BUILD_MUSIC_ARM64_V8A" = true ]; then
build_music "$MUSIC_PATCHER_ARGS" "$ARM64_V8A"
fi
if [ "$BUILD_MUSIC_ARM_V7A" = true ]; then
build_music "$MUSIC_PATCHER_ARGS" "$ARM_V7A"
fi
if [ "$BUILD_TWITTER" = true ]; then
build_twitter
fi
echo "Done"