templates: Support extracting only either common or target device blobs
Change-Id: I33e8c4b79985912199b9776529a32a8a5d7a5aef
This commit is contained in:
committed by
Michael Bestas
parent
805a68421a
commit
55ec886933
@@ -24,11 +24,19 @@ source "${HELPER}"
|
|||||||
# Default to sanitizing the vendor folder before extraction
|
# Default to sanitizing the vendor folder before extraction
|
||||||
CLEAN_VENDOR=true
|
CLEAN_VENDOR=true
|
||||||
|
|
||||||
|
ONLY_COMMON=
|
||||||
|
ONLY_TARGET=
|
||||||
KANG=
|
KANG=
|
||||||
SECTION=
|
SECTION=
|
||||||
|
|
||||||
while [ "${#}" -gt 0 ]; do
|
while [ "${#}" -gt 0 ]; do
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
|
--only-common )
|
||||||
|
ONLY_COMMON=true
|
||||||
|
;;
|
||||||
|
--only-target )
|
||||||
|
ONLY_TARGET=true
|
||||||
|
;;
|
||||||
-n | --no-cleanup )
|
-n | --no-cleanup )
|
||||||
CLEAN_VENDOR=false
|
CLEAN_VENDOR=false
|
||||||
;;
|
;;
|
||||||
@@ -61,12 +69,14 @@ function blob_fixup() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ -z "${ONLY_TARGET}" ]; then
|
||||||
# Initialize the helper for common device
|
# Initialize the helper for common device
|
||||||
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}"
|
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}"
|
||||||
|
|
||||||
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
|
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -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}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
|
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
|
||||||
|
|||||||
Reference in New Issue
Block a user