sdm660-common: Rework extract-files with --kang support
* Implementation from lineage vendor extract-files Change-Id: I1170fcfa1ec237c9c0b322e9f268bdeb685b473a
This commit is contained in:
parent
16b0971961
commit
4d8d346939
1 changed files with 21 additions and 15 deletions
|
@ -33,20 +33,24 @@ if [ ! -f "$HELPER" ]; then
|
||||||
fi
|
fi
|
||||||
. "$HELPER"
|
. "$HELPER"
|
||||||
|
|
||||||
# default to not sanitizing the vendor folder before extraction
|
# Default to sanitizing the vendor folder before extraction
|
||||||
clean_vendor=false
|
CLEAN_VENDOR=true
|
||||||
|
|
||||||
while [ "$1" != "" ]; do
|
while [ "${#}" -gt 0 ]; do
|
||||||
case $1 in
|
case "${1}" in
|
||||||
-p | --path ) shift
|
-n | --no-cleanup )
|
||||||
SRC=$1
|
CLEAN_VENDOR=false
|
||||||
;;
|
;;
|
||||||
-s | --section ) shift
|
-k | --kang )
|
||||||
SECTION=$1
|
KANG="--kang"
|
||||||
clean_vendor=false
|
;;
|
||||||
;;
|
-s | --section )
|
||||||
-c | --clean-vendor ) clean_vendor=true
|
SECTION="${2}"; shift
|
||||||
;;
|
CLEAN_VENDOR=false
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
SRC="${1}"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
@ -58,12 +62,14 @@ fi
|
||||||
# Initialize the common helper
|
# Initialize the common helper
|
||||||
setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true $clean_vendor
|
setup_vendor "$DEVICE_COMMON" "$VENDOR" "$LINEAGE_ROOT" true $clean_vendor
|
||||||
|
|
||||||
extract "$MY_DIR"/proprietary-files.txt "$SRC" "$SECTION"
|
extract "$MY_DIR"/proprietary-files.txt "$SRC" \
|
||||||
|
"${KANG}" --section "${SECTION}"
|
||||||
|
|
||||||
if [ -s "$MY_DIR"/../$DEVICE/proprietary-files.txt ]; then
|
if [ -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" "$SECTION"
|
extract "$MY_DIR"/../$DEVICE/proprietary-files.txt "$SRC" \
|
||||||
|
"${KANG}" --section "${SECTION}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$MY_DIR"/setup-makefiles.sh
|
"$MY_DIR"/setup-makefiles.sh
|
||||||
|
|
Loading…
Reference in a new issue