Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8e06d35 authored by Adrian DC's avatar Adrian DC Committed by Michael Bestas
Browse files

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
parent 6393a3f0
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -871,12 +871,12 @@ EOF
    fi

    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
        case $FILE in
            $OUT/system/*|$OUT/data/*)
                # Get target file name (i.e. /system/bin/adb)
                TARGET=$(echo $FILE | sed "s#$OUT##")
        case $TARGET in
            /system/*|/data/*)
                # Get out file from target (i.e. /system/bin/adb)
                FILE=$OUT$TARGET
            ;;
            *) continue ;;
        esac