extract_utils: be compatible with system-as-root layouts
* The use case is that if you have the following layout:
$TOP --- system.img
|
+-- vendor.img
you should be able (from $TOP) to:
mkdir system; mount -o ro,loop system.img system
mkdir vendor; mount -o ro,loop vendor.img vendor
and then (from device tree)
./extract-files.sh $TOP
But this doesn't work if system.img is SAR and contains another
"system" dir inside. This patch makes sure it searches for a "system"
dir in the provided path as well, if it couldn't find the blob
anywhere else.
Change-Id: Ib49cd5b587b3a57478a66ff69cf840270c2b1403
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
This commit is contained in:
committed by
Michael Bestas
parent
eac2f563fd
commit
ee437e3264
@@ -756,6 +756,7 @@ function get_file() {
|
||||
# try to copy
|
||||
cp -r "$SRC/$1" "$2" 2>/dev/null && return 0
|
||||
cp -r "$SRC/${1#/system}" "$2" 2>/dev/null && return 0
|
||||
cp -r "$SRC/system/$1" "$2" 2>/dev/null && return 0
|
||||
|
||||
return 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user