mirror of
https://github.com/Evolution-X-Devices/device_google_taimen
synced 2026-01-27 15:59:12 +00:00
taimen: Import and tailor {extract-files,setup-makefiles}.sh
This is a squash of the following: Author: Bruno Martins <bgcngm@gmail.com> Date: Tue Jun 19 23:55:25 2018 +0100 taimen: Fix typo from CodeAurora in blob_fixup * Let com.qualcomm.qcrilmsgtunnel break free Change-Id: Ide5759eef7e3100ac5b50f5dc95a3f90119e592f Author: Michael Bestas <mkbestas@lineageos.org> Date: Sat Dec 19 02:53:35 2020 +0200 taimen: Switch to standalone extract utils Align with templates while we are at it Change-Id: Ife50623a3d1b8733f5cc76995c982d8950d39ad4 Author: Rashed Abdel-Tawab <rashed@linux.com> Date: Tue May 14 00:36:02 2019 -0700 taimen: Import and tailor {extract-files,setup-makefiles}.sh * Partial pick of Id399faa404207ce018f0f0187c9576b61f5d4dc9. Change-Id: I866e015e3ba717ae7fc585dc56f118f3e251154c Change-Id: I231d822f364f57314009be4d08af993b97bf5705
This commit is contained in:
committed by
Asriadi Rahim
parent
0e2bb683ad
commit
6f3d5db7b7
71
extract-files.sh
Normal file
71
extract-files.sh
Normal file
@@ -0,0 +1,71 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2016 The CyanogenMod Project
|
||||
# Copyright (C) 2017-2020 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
DEVICE=taimen
|
||||
VENDOR=google
|
||||
|
||||
# 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}"
|
||||
|
||||
# Default to sanitizing the vendor folder before extraction
|
||||
CLEAN_VENDOR=true
|
||||
|
||||
KANG=
|
||||
SECTION=
|
||||
|
||||
while [ "${#}" -gt 0 ]; do
|
||||
case "${1}" in
|
||||
-n | --no-cleanup )
|
||||
CLEAN_VENDOR=false
|
||||
;;
|
||||
-k | --kang )
|
||||
KANG="--kang"
|
||||
;;
|
||||
-s | --section )
|
||||
SECTION="${2}"; shift
|
||||
CLEAN_VENDOR=false
|
||||
;;
|
||||
* )
|
||||
SRC="${1}"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if [ -z "${SRC}" ]; then
|
||||
SRC="adb"
|
||||
fi
|
||||
|
||||
function blob_fixup() {
|
||||
case "${1}" in
|
||||
# Fix typo in qcrilmsgtunnel whitelist
|
||||
product/etc/sysconfig/nexus.xml)
|
||||
sed -i 's/qulacomm/qualcomm/' "${2}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Initialize the helper
|
||||
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
|
||||
|
||||
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
|
||||
extract "${MY_DIR}/proprietary-files-vendor.txt" "${SRC}" "${KANG}" --section "${SECTION}"
|
||||
|
||||
"${MY_DIR}/setup-makefiles.sh"
|
||||
37
setup-makefiles.sh
Normal file
37
setup-makefiles.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2016 The CyanogenMod Project
|
||||
# Copyright (C) 2017-2020 The LineageOS Project
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
DEVICE=taimen
|
||||
VENDOR=google
|
||||
|
||||
# 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" true
|
||||
write_makefiles "${MY_DIR}/proprietary-files-vendor.txt" true
|
||||
|
||||
# Finish
|
||||
write_footers
|
||||
Reference in New Issue
Block a user