extract_files: Add support for specifying blob sections
Sometimes the need arises to update one specific subset of blobs while holding others steady. Introduce a way to specify the "section" of blobs to update (obviously requires the proprietary-files to be properly split up first) Requires additional changes in device tree extract_files.sh to support passing the additional arguments Change-Id: I98feab56f8bfade2818b1b5264e019440d4c57c5
This commit is contained in:
parent
675d9595e4
commit
855fbdd4bc
1 changed files with 12 additions and 2 deletions
|
@ -555,6 +555,7 @@ function _adb_connected {
|
|||
# parse_file_list:
|
||||
#
|
||||
# $1: input file
|
||||
# $2: blob section in file - optional
|
||||
#
|
||||
# Sets PRODUCT_PACKAGES and PRODUCT_COPY_FILES while parsing the input file
|
||||
#
|
||||
|
@ -567,6 +568,14 @@ function parse_file_list() {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ $# -eq 2 ]; then
|
||||
LIST=$TMPDIR/files.txt
|
||||
cat $1 | sed -n '/# '"$2"'/I,/^\s*$/p' > $LIST
|
||||
else
|
||||
LIST=$1
|
||||
fi
|
||||
|
||||
|
||||
PRODUCT_PACKAGES_LIST=()
|
||||
PRODUCT_PACKAGES_HASHES=()
|
||||
PRODUCT_COPY_FILES_LIST=()
|
||||
|
@ -595,7 +604,7 @@ function parse_file_list() {
|
|||
PRODUCT_COPY_FILES_HASHES+=("$HASH")
|
||||
fi
|
||||
|
||||
done < <(egrep -v '(^#|^[[:space:]]*$)' "$1" | LC_ALL=C sort | uniq)
|
||||
done < <(egrep -v '(^#|^[[:space:]]*$)' "$LIST" | LC_ALL=C sort | uniq)
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -779,6 +788,7 @@ function fix_xml() {
|
|||
#
|
||||
# $1: file containing the list of items to extract
|
||||
# $2: path to extracted system folder, an ota zip file, or "adb" to extract from device
|
||||
# $3: section in list file to extract - optional
|
||||
#
|
||||
function extract() {
|
||||
if [ -z "$OUTDIR" ]; then
|
||||
|
@ -786,7 +796,7 @@ function extract() {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
parse_file_list "$1"
|
||||
parse_file_list "$1" "$3"
|
||||
|
||||
# Allow failing, so we can try $DEST and/or $FILE
|
||||
set +e
|
||||
|
|
Loading…
Reference in a new issue