filter: match $TEST_* $SCRATCH_* in beginning of path string
authorAmir Goldstein <amir73il@gmail.com>
Fri, 10 Mar 2017 07:39:56 +0000 (09:39 +0200)
committerEryu Guan <eguan@redhat.com>
Fri, 10 Mar 2017 08:54:20 +0000 (16:54 +0800)
commit6b825e018ed949b7c28b4dc7678c21f1cf30c55f
tree5636c6f39f0f8cb547c99c299f378a2700ae2956
parent5e6892dd8be6cd55e5f4615f1b1dbe9651535a1c
filter: match $TEST_* $SCRATCH_* in beginning of path string

For example, if $TEST_DIR=/mnt, only replace instances of /mnt that
are in the beginning of a path string, e.g.:

"/mnt/mntA/mntB:/mnt/mntC" => "TEST_DIR/mntA/mntB:TEST_DIR/mntC"

With this change, there is no longer a need to check the case of
$TEST_DEV being a substring of $TEST_DIR, because that would mean
that $TEST_DIR is a prefix of $TEST_DIR and that is not possible.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/filter