gta4xl-common: Allow extracting only firmware images
Change-Id: Icab3f013661304e3a9ec89b0816a8139f6b8e8e5
diff --git a/extract-files.sh b/extract-files.sh
index 1ac3a47..84778c2 100755
--- a/extract-files.sh
+++ b/extract-files.sh
@@ -26,6 +26,7 @@
ONLY_COMMON=
ONLY_TARGET=
+ONLY_FIRMWARE=
KANG=
SECTION=
@@ -37,6 +38,9 @@
--only-target )
ONLY_TARGET=true
;;
+ --only-firmware )
+ ONLY_FIRMWARE=true
+ ;;
-n | --no-cleanup )
CLEAN_VENDOR=false
;;
@@ -76,7 +80,9 @@
# 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}"
+ if [ -z "${ONLY_FIRMWARE}" ]; then
+ extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
+ fi
fi
if [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then
@@ -84,7 +90,9 @@
source "${MY_DIR}/../${DEVICE}/extract-files.sh"
setup_vendor "${DEVICE}" "${VENDOR}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
- extract "${MY_DIR}/../${DEVICE}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
+ if [ -z "${ONLY_FIRMWARE}" ]; then
+ extract "${MY_DIR}/../${DEVICE}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
+ fi
if [ -z "${SECTION}" ] && [ -f "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" ]; then
extract_firmware "${MY_DIR}/../../${VENDOR}/${DEVICE}/proprietary-firmware.txt" "${SRC}"