sdm660-common: Add possiblilty to only extract Device Blobs

Change-Id: Iaf04cfebec23a02d9ce1aaa4d472a98e547b975b
This commit is contained in:
Max Weffers 2020-01-14 12:39:10 +01:00
parent d3ddf866f6
commit eba26e510d
No known key found for this signature in database
GPG key ID: 795F73D22FB93FAE

View file

@ -36,12 +36,16 @@ fi
# Default to sanitizing the vendor folder before extraction
clean_vendor=true
ONLY_COMMON=
ONLY_DEVICE=
while [ "${#}" -gt 0 ]; do
case "${1}" in
-o | --only-common )
ONLY_COMMON=false
;;
-d | --only-device )
ONLY_DEVICE=false
;;
-n | --no-cleanup )
CLEAN_VENDOR=false
;;
@ -51,6 +55,7 @@ while [ "${#}" -gt 0 ]; do
-s | --section )
SECTION="${2}"; shift
clean_vendor=false
CLEAN_VENDOR=false
;;
* )
SRC="${1}"
@ -92,8 +97,10 @@ function blob_fixup() {
# Initialize the common helper
setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true $clean_vendor
if [ -z "${ONLY_DEVICE}" ] && [ -s "${MY_DIR}/proprietary-files.txt" ]; then
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