miatoll: Switch to standalone extract utils

This commit is contained in:
Michael Bestas 2021-01-30 20:05:30 +05:30 committed by Aryan Gupta
parent 4f83b493f6
commit 78d2d0c2e2
2 changed files with 7 additions and 10 deletions

View File

@ -16,18 +16,15 @@ export DEVICE_BRINGUP_YEAR=2020
MY_DIR="${BASH_SOURCE%/*}"
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
echo "Unable to find helper script at ${HELPER}"
exit 1
fi
source "${HELPER}"
# Default to sanitizing the vendor folder before extraction
CLEAN_VENDOR=true
SECTION=
KANG=
@ -55,7 +52,7 @@ if [ -z "${SRC}" ]; then
fi
# 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}" \
"${KANG}" --section "${SECTION}"

View File

@ -17,9 +17,9 @@ INITIAL_COPYRIGHT_YEAR=2020
MY_DIR="${BASH_SOURCE%/*}"
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
echo "Unable to find helper script at ${HELPER}"
exit 1
@ -27,7 +27,7 @@ fi
source "${HELPER}"
# 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
write_headers "curtana"
@ -41,7 +41,7 @@ write_footers
if [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then
# Reinitialize the helper for device
INITIAL_COPYRIGHT_YEAR="$DEVICE_BRINGUP_YEAR"
setup_vendor "${DEVICE}" "${VENDOR}" "${LINEAGE_ROOT}" false
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false
# Copyright headers and guards
write_headers