From b2f8eeed02fa582450129dda3421fcb683ba5577 Mon Sep 17 00:00:00 2001 From: Bruno Martins Date: Sun, 24 May 2020 08:52:36 +0100 Subject: msm8996-common: Also allow extracting target device blobs only Change-Id: Ib5157b1e182ac6faf212793871ddff28fc32063d --- extract-files.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/extract-files.sh b/extract-files.sh index ea3396b..27291a5 100755 --- a/extract-files.sh +++ b/extract-files.sh @@ -1,7 +1,7 @@ #!/bin/bash # # Copyright (C) 2016 The CyanogenMod Project -# Copyright (C) 2017 The LineageOS Project +# Copyright (C) 2017-2020 The LineageOS Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -35,13 +35,17 @@ source "${HELPER}" 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 @@ -144,11 +148,13 @@ function blob_fixup() { esac } -# Initialize the helper for common device -setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}" +if [ -z "${ONLY_TARGET}" ]; then + # Initialize the helper for common device + 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 [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then # Reinitialize the helper for device -- cgit v1.2.3