envsetup: Filter unique push paths in dopush
* Reverse the FILE and TARGET handling to sort and filter unique paths to be pushed * Resolves the 'mkap systemimage' where /system/etc/nano/* symlinks were pushed multiple times in loops Change-Id: I178cec2e1708ad9239d9e544544fca157639e3b5
This commit is contained in:
committed by
Michael Bestas
parent
6393a3f083
commit
a8e06d3593
@@ -871,12 +871,12 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
stop_n_start=false
|
stop_n_start=false
|
||||||
for FILE in $(echo $LOC | tr " " "\n"); do
|
for TARGET in $(echo $LOC | tr " " "\n" | sed "s#.*$OUT##" | sort | uniq); do
|
||||||
# Make sure file is in $OUT/system or $OUT/data
|
# Make sure file is in $OUT/system or $OUT/data
|
||||||
case $FILE in
|
case $TARGET in
|
||||||
$OUT/system/*|$OUT/data/*)
|
/system/*|/data/*)
|
||||||
# Get target file name (i.e. /system/bin/adb)
|
# Get out file from target (i.e. /system/bin/adb)
|
||||||
TARGET=$(echo $FILE | sed "s#$OUT##")
|
FILE=$OUT$TARGET
|
||||||
;;
|
;;
|
||||||
*) continue ;;
|
*) continue ;;
|
||||||
esac
|
esac
|
||||||
|
Reference in New Issue
Block a user