build: add BUILD variable
This commit is contained in:
@@ -3,6 +3,7 @@ set -euo pipefail
|
||||
|
||||
readonly ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$ROOT"
|
||||
readonly BUILD="$ROOT/build-los"
|
||||
|
||||
readonly MANIFEST_URL="https://github.com/LineageOS/android.git"
|
||||
readonly MANIFEST_BRANCH="cm-14.1"
|
||||
@@ -23,7 +24,7 @@ commands:
|
||||
bootimage build boot.img (kernel + dt.img + ramdisk, fast gate)
|
||||
bacon full build -> lineage_rubenslte-*.zip
|
||||
clean mka clean
|
||||
prune remove all of los-build
|
||||
prune remove all of "$BUILD"
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -36,8 +37,8 @@ append_seandroidenforce() {
|
||||
}
|
||||
|
||||
do_build() {
|
||||
mkdir -p los-build
|
||||
cd los-build
|
||||
mkdir -p "$BUILD"
|
||||
cd "$BUILD"
|
||||
|
||||
if [ ! -d .repo ]; then
|
||||
rlte_print "Setting up repo"
|
||||
@@ -83,7 +84,7 @@ do_build() {
|
||||
|
||||
if [ "$CMD" != "clean" ]; then
|
||||
rlte_print "Appending SEANDROIDENFORCE"
|
||||
append_seandroidenforce "$ROOT/los-build/out/target/product/rubenslte/boot.img"
|
||||
append_seandroidenforce "$BUILD/out/target/product/rubenslte/boot.img"
|
||||
fi
|
||||
|
||||
rlte_ok "Done."
|
||||
@@ -101,6 +102,6 @@ shift $((OPTIND - 1))
|
||||
|
||||
case "${1:-}" in
|
||||
bootimage|bacon|clean) CMD="${1:-}"; do_build ;;
|
||||
prune) rm -rf los-build ;;
|
||||
prune) rm -rf "$BUILD" ;;
|
||||
*) usage; exit 1 ;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user