configure: Properly escape arguments in filter/filter_out helper functions
The arguments may contain '$', which gets interpreted by the shell. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
4
configure
vendored
4
configure
vendored
@@ -433,7 +433,7 @@ filter(){
|
|||||||
pat=$1
|
pat=$1
|
||||||
shift
|
shift
|
||||||
for v; do
|
for v; do
|
||||||
eval "case $v in $pat) printf '%s ' $v ;; esac"
|
eval "case '$v' in $pat) printf '%s ' '$v' ;; esac"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -441,7 +441,7 @@ filter_out(){
|
|||||||
pat=$1
|
pat=$1
|
||||||
shift
|
shift
|
||||||
for v; do
|
for v; do
|
||||||
eval "case $v in $pat) ;; *) printf '%s ' $v ;; esac"
|
eval "case '$v' in $pat) ;; *) printf '%s ' '$v' ;; esac"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user