-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild_pixelage
More file actions
executable file
·92 lines (74 loc) · 1.81 KB
/
Copy pathbuild_pixelage
File metadata and controls
executable file
·92 lines (74 loc) · 1.81 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
# SPDX-FileCopyrightText: 2024 Edrick Sinsuan
# SPDX-License-Identifier: Apache-2.0
script_dir=$(dirname $0)
if ! check_file "$script_dir/setup_env"; then
decho "setup_env must be present in $script_dir!"
exit_timestamp 1
fi
source $script_dir/setup_env
build_init
# Pixelage directories
readonly ROM_NAME="pixelage"
readonly ROM_DIR="$(pwd)"
if [[ -z $(echo $ROM_DIR | grep -i $ROM_NAME | grep -vi "${ROM_NAME}/") ]]; then
decho "You are not in the right directory."
exit_timestamp 1
fi
# Default properties
build_device=dumpling
build_type=user
build_number=bp1a
export WITH_GMS=true
#
# Build functions
#
pixelage_build() {
local target_device=$1
decho "Building Pixelage: $target_device - $build_type"
cleanup_path
export PIXELAGE_BUILD="$target_device"
source build/envsetup.sh
lunch pixelage_$target_device-$build_number-$build_type
m installclean
lunch pixelage_$target_device-$build_number-$build_type
mka bacon -j$(nproc --all)
restore_path
rom_copy_and_clean "ProjectPixelage" $target_device $build_type
}
param_func() {
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
-d|--device)
if check_valid "$2"; then
build_device="$2"
shift
fi
;;
-t|--type)
if check_valid "$2"; then
build_type="$2"
shift
fi
;;
-a|--all)
build_all=y
;;
esac
shift
done
}
#
# Build start
#
param_func "$@"
if [[ $build_all == "y" ]]; then
for device in ${devices_list[@]}; do
pixelage_build $device
done
exit_timestamp 0
fi
pixelage_build $build_device
exit_timestamp 0