sdm660-common: Add ability to extract common proprietary files only

Change-Id: Id4303ba662f60cb794aac65ebde652b643ea2345
This commit is contained in:
Bruno Martins 2019-10-12 14:43:38 +01:00 committed by Max Weffers
parent 9f82738458
commit e777d7e0d5
No known key found for this signature in database
GPG key ID: 795F73D22FB93FAE

View file

@ -35,9 +35,13 @@ fi
# Default to sanitizing the vendor folder before extraction # Default to sanitizing the vendor folder before extraction
clean_vendor=true clean_vendor=true
ONLY_COMMON=
while [ "${#}" -gt 0 ]; do while [ "${#}" -gt 0 ]; do
case "${1}" in case "${1}" in
-o | --only-common )
ONLY_COMMON=false
;;
-n | --no-cleanup ) -n | --no-cleanup )
CLEAN_VENDOR=false CLEAN_VENDOR=false
;; ;;
@ -92,7 +96,7 @@ setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true $clean_vendor
extract "$MY_DIR"/proprietary-files.txt "$SRC" \ extract "$MY_DIR"/proprietary-files.txt "$SRC" \
"${KANG}" --section "${SECTION}" "${KANG}" --section "${SECTION}"
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
setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT" false "$CLEAN_VENDOR" setup_vendor "$DEVICE" "$VENDOR" "$LINEAGE_ROOT" false "$CLEAN_VENDOR"
extract "$MY_DIR"/../$DEVICE/proprietary-files.txt "$SRC" \ extract "$MY_DIR"/../$DEVICE/proprietary-files.txt "$SRC" \