diff options
-rwxr-xr-x | extract-files.sh | 20 |
1 files 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 |