From 84a5f074c8038b977b60305b30737c13e7908129 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Sun, 24 May 2020 08:52:36 +0100 Subject: [PATCH] universal7885: Also allow extracting target device blobs only Change-Id: Ib5157b1e182ac6faf212793871ddff28fc32063d Signed-off-by: SamarV-121 --- extract-files.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/extract-files.sh b/extract-files.sh index 4446686..74f7594 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -50,13 +50,17 @@ function blob_fixup { CLEAN_VENDOR=true ONLY_COMMON= +ONLY_TARGET= SECTION= KANG= while [ "${#}" -gt 0 ]; do case "${1}" in - -o | --only-common ) - ONLY_COMMON=false + --only-common ) + ONLY_COMMON=true + ;; + --only-target ) + ONLY_TARGET=true ;; -n | --no-cleanup ) CLEAN_VENDOR=false @@ -80,10 +84,13 @@ if [ -z "${SRC}" ]; then fi # Initialize the helper for common device -setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${LINEAGE_ROOT}" true "${CLEAN_VENDOR}" +if [ -z "${ONLY_TARGET}" ]; then + # Initialize the helper for common device + setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${LINEAGE_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 [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then # Reinitialize the helper for device