sdm845-common: Switch to standalone extract utils
Align with templates while we are at it Change-Id: Ife50623a3d1b8733f5cc76995c982d8950d39ad4
This commit is contained in:
parent
6bf2c85ef0
commit
9ad050b2fe
@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright (C) 2018-2020 The LineageOS Project
|
# Copyright (C) 2016 The CyanogenMod Project
|
||||||
|
# Copyright (C) 2017-2020 The LineageOS Project
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
@ -11,9 +12,9 @@ set -e
|
|||||||
MY_DIR="${BASH_SOURCE%/*}"
|
MY_DIR="${BASH_SOURCE%/*}"
|
||||||
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
||||||
|
|
||||||
LINEAGE_ROOT="${MY_DIR}"/../../..
|
ANDROID_ROOT="${MY_DIR}/../../.."
|
||||||
|
|
||||||
HELPER="${LINEAGE_ROOT}/vendor/lineage/build/tools/extract_utils.sh"
|
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
|
||||||
if [ ! -f "${HELPER}" ]; then
|
if [ ! -f "${HELPER}" ]; then
|
||||||
echo "Unable to find helper script at ${HELPER}"
|
echo "Unable to find helper script at ${HELPER}"
|
||||||
exit 1
|
exit 1
|
||||||
@ -82,19 +83,17 @@ fi
|
|||||||
|
|
||||||
if [ -z "${ONLY_TARGET}" ]; then
|
if [ -z "${ONLY_TARGET}" ]; then
|
||||||
# Initialize the helper for common device
|
# Initialize the helper for common device
|
||||||
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${LINEAGE_ROOT}" true "${CLEAN_VENDOR}"
|
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}"
|
||||||
|
|
||||||
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" \
|
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
|
||||||
"${KANG}" --section "${SECTION}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then
|
if [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then
|
||||||
# Reinitialize the helper for device
|
# Reinitialize the helper for device
|
||||||
source "${MY_DIR}/../${DEVICE}/extract-files.sh"
|
source "${MY_DIR}/../${DEVICE}/extract-files.sh"
|
||||||
setup_vendor "${DEVICE}" "${VENDOR}" "${LINEAGE_ROOT}" false "${CLEAN_VENDOR}"
|
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
|
||||||
|
|
||||||
extract "${MY_DIR}/../${DEVICE}/proprietary-files.txt" "${SRC}" \
|
extract "${MY_DIR}/../${DEVICE}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
|
||||||
"${KANG}" --section "${SECTION}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"${MY_DIR}/setup-makefiles.sh"
|
"${MY_DIR}/setup-makefiles.sh"
|
||||||
|
@ -1,21 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright (C) 2018-2019 The LineageOS Project
|
# Copyright (C) 2016 The CyanogenMod Project
|
||||||
|
# Copyright (C) 2017-2020 The LineageOS Project
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
INITIAL_COPYRIGHT_YEAR=2018
|
|
||||||
|
|
||||||
# Load extract_utils and do some sanity checks
|
# Load extract_utils and do some sanity checks
|
||||||
MY_DIR="${BASH_SOURCE%/*}"
|
MY_DIR="${BASH_SOURCE%/*}"
|
||||||
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
|
||||||
|
|
||||||
LINEAGE_ROOT="${MY_DIR}/../../.."
|
ANDROID_ROOT="${MY_DIR}/../../.."
|
||||||
|
|
||||||
HELPER="${LINEAGE_ROOT}/vendor/lineage/build/tools/extract_utils.sh"
|
HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
|
||||||
if [ ! -f "${HELPER}" ]; then
|
if [ ! -f "${HELPER}" ]; then
|
||||||
echo "Unable to find helper script at ${HELPER}"
|
echo "Unable to find helper script at ${HELPER}"
|
||||||
exit 1
|
exit 1
|
||||||
@ -23,9 +22,9 @@ fi
|
|||||||
source "${HELPER}"
|
source "${HELPER}"
|
||||||
|
|
||||||
# Initialize the helper for common
|
# Initialize the helper for common
|
||||||
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${LINEAGE_ROOT}" true
|
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true
|
||||||
|
|
||||||
# Copyright headers and guards
|
# Warning headers and guards
|
||||||
write_headers "beryllium dipper equuleus perseus polaris ursa"
|
write_headers "beryllium dipper equuleus perseus polaris ursa"
|
||||||
|
|
||||||
# The standard common blobs
|
# The standard common blobs
|
||||||
@ -36,10 +35,9 @@ write_footers
|
|||||||
|
|
||||||
if [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then
|
if [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then
|
||||||
# Reinitialize the helper for device
|
# Reinitialize the helper for device
|
||||||
INITIAL_COPYRIGHT_YEAR="$DEVICE_BRINGUP_YEAR"
|
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false
|
||||||
setup_vendor "${DEVICE}" "${VENDOR}" "${LINEAGE_ROOT}" false
|
|
||||||
|
|
||||||
# Copyright headers and guards
|
# Warning headers and guards
|
||||||
write_headers
|
write_headers
|
||||||
|
|
||||||
# The standard device blobs
|
# The standard device blobs
|
||||||
|
Loading…
Reference in New Issue
Block a user