Alexander Martinz | 0920b7b | 2022-04-07 18:05:45 +0200 | [diff] [blame] | 1 | function __print_shift_functions_help() { |
| 2 | cat <<EOF |
| 3 | |
| 4 | Additional ShiftOS functions: |
| 5 | - build_gms_enable: Enables building with Google APPS (GMS) |
| 6 | - build_gms_disable: Disables building with Google APPS (GMS) |
| 7 | |
| 8 | - build_disable_beta: Do not mark build as beta |
| 9 | - build_enable_beta: Mark build as beta |
| 10 | |
| 11 | EOF |
| 12 | } |
| 13 | |
| 14 | function build_gms_enable() { |
| 15 | export BUILD_GMS=true |
| 16 | export SHIFT_BUILD_WITH_GMS=true |
| 17 | export WITH_GMS=true |
Alexander Martinz | 7a7ad75 | 2022-04-08 13:48:06 +0200 | [diff] [blame] | 18 | export WITH_GMS_MAINLINE=true |
Alexander Martinz | 0920b7b | 2022-04-07 18:05:45 +0200 | [diff] [blame] | 19 | } |
| 20 | function build_gms_disable() { |
| 21 | export BUILD_GMS=false |
| 22 | export SHIFT_BUILD_WITH_GMS=false |
| 23 | export WITH_GMS=false |
Alexander Martinz | 7a7ad75 | 2022-04-08 13:48:06 +0200 | [diff] [blame] | 24 | export WITH_GMS_MAINLINE=false |
Alexander Martinz | 0920b7b | 2022-04-07 18:05:45 +0200 | [diff] [blame] | 25 | } |
| 26 | |
| 27 | function build_disable_beta() { |
| 28 | export SHIFT_BUILD_IS_BETA=false |
| 29 | } |
| 30 | function build_enable_beta() { |
| 31 | export SHIFT_BUILD_IS_BETA=true |
| 32 | } |
| 33 | |
Alexander Martinz | 74f0b6f | 2022-04-07 21:05:41 +0200 | [diff] [blame] | 34 | # Check if PARTNER_GMS exists |
| 35 | _PARTNER_GMS_EXISTING=$([ -d "vendor/partner_gms" ] && echo true || echo false) |
Alexander Martinz | 7a7ad75 | 2022-04-08 13:48:06 +0200 | [diff] [blame] | 36 | _PARTNER_MODULES_EXISTING=$([ -d "vendor/partner_modules" ] && echo true || echo false) |
Alexander Martinz | 74f0b6f | 2022-04-07 21:05:41 +0200 | [diff] [blame] | 37 | |
Alexander Martinz | 0920b7b | 2022-04-07 18:05:45 +0200 | [diff] [blame] | 38 | # set GMS property if not specified |
Alexander Martinz | 74f0b6f | 2022-04-07 21:05:41 +0200 | [diff] [blame] | 39 | : ${BUILD_GMS:=$_PARTNER_GMS_EXISTING} |
| 40 | : ${SHIFT_BUILD_WITH_GMS:=$_PARTNER_GMS_EXISTING} |
| 41 | : ${WITH_GMS:=$_PARTNER_GMS_EXISTING} |
Alexander Martinz | 7a7ad75 | 2022-04-08 13:48:06 +0200 | [diff] [blame] | 42 | : ${WITH_GMS_MAINLINE:=$_PARTNER_MODULES_EXISTING} |
Alexander Martinz | 74f0b6f | 2022-04-07 21:05:41 +0200 | [diff] [blame] | 43 | export BUILD_GMS |
Alexander Martinz | 0920b7b | 2022-04-07 18:05:45 +0200 | [diff] [blame] | 44 | export SHIFT_BUILD_WITH_GMS |
Alexander Martinz | 74f0b6f | 2022-04-07 21:05:41 +0200 | [diff] [blame] | 45 | export WITH_GMS |
Alexander Martinz | 7a7ad75 | 2022-04-08 13:48:06 +0200 | [diff] [blame] | 46 | export WITH_GMS_MAINLINE |