mirror of
https://github.com/LineageOS/android_device_essential_mata.git
synced 2025-10-29 11:49:27 +00:00
50 lines
1.1 KiB
Bash
Executable File
50 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# SPDX-FileCopyrightText: 2016 The CyanogenMod Project
|
|
# SPDX-FileCopyrightText: 2017-2024 The LineageOS Project
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
|
|
# If we're being sourced by the common script that we called,
|
|
# stop right here. No need to go down the rabbit hole.
|
|
if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
|
|
return
|
|
fi
|
|
|
|
set -e
|
|
|
|
DEVICE=mata
|
|
VENDOR=essential
|
|
|
|
# Load extract_utils and do some sanity checks
|
|
MY_DIR="${BASH_SOURCE%/*}"
|
|
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
|
|
|
ANDROID_ROOT="${MY_DIR}/../../.."
|
|
|
|
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
|
|
if [ ! -f "${HELPER}" ]; then
|
|
echo "Unable to find helper script at ${HELPER}"
|
|
exit 1
|
|
fi
|
|
source "${HELPER}"
|
|
|
|
# Initialize the helper
|
|
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}"
|
|
|
|
# Warning headers and guards
|
|
write_headers
|
|
|
|
write_makefiles "${MY_DIR}/proprietary-files.txt"
|
|
|
|
append_firmware_calls_to_makefiles "${MY_DIR}/proprietary-firmware.txt"
|
|
|
|
cat << EOF >> "$BOARDMK"
|
|
|
|
TARGET_RECOVERY_DEVICE_DIRS += vendor/$VENDOR/$DEVICE/proprietary
|
|
EOF
|
|
|
|
# Finish
|
|
write_footers
|