-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-auto.sh
More file actions
71 lines (60 loc) · 1.98 KB
/
Copy pathbuild-auto.sh
File metadata and controls
71 lines (60 loc) · 1.98 KB
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
#!/usr/bin/env bash
# Set variables
MANIFESTURL=https://github.com/Merlin-Development/manifests/raw/lineage-16.0/merlin.xml
PATCHSCRIPT=https://github.com/Merlin-Development/manifests/raw/lineage-16.0/patch.sh
# Finish setting variables
# Start custom functions
repo_sync () {
repo sync -c -j12 && (
echo "===================================================="
echo "===================Sync Finished===================="
echo "===================================================="
) || (
echo "===================================================="
echo "====================Sync Error======================"
echo "===================================================="
return 1
)
}
build_device () {
device=$1
if [ "$nofif" -eq "notify" ]; then
notify -t "Build Started"
elif [ "$notif" -eq "simplepush" ]; then
simplepush $key "Build" "Build Started"
fi
(
brunch $device
) && (
echo "===================================================="
echo "==================Build Finished===================="
echo "===================================================="
) || (
echo "===================================================="
echo "===================Build Error======================"
echo "===================================================="
return 1
)
}
# Finish custom functions
# Start script
echo "This script is going to sync sources of lineage os 16.0"
echo "and build for the Moto G3 Turbo (merlin)"
echo "Checking if repo is installed"
which repo && echo "Repo is installed" || ( echo "Repo isn't installed, plese install it" && exit )
echo ""
echo "Creating directory and initiating repo"
mkdir lineage && cd lineage
repo init -u git://github.com/LineageOS/android.git -b lineage-16.0
curl --create-dirs -L -o .repo/local_manifests/merlin.xml -O -L $MANIFESTURL
echo "Syncing sources"
repo_sync
echo "Patching"
curl $PATCHSCRIPT
chmod +x patch.sh
./patch.sh
echo "Building"
. build/envsetup.sh
build_device merlin
echo "done..."
# Finish script