mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-05 18:05:16 +00:00
bootstrap-packages.sh escape ++
We need to escape + when egreping parent makefile too. Reviewed by: stevek
This commit is contained in:
parent
c5c0e79bb0
commit
0aa4a9fc85
@ -118,13 +118,17 @@ end_options() {
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
no_plus() {
|
||||||
|
case "$1" in
|
||||||
|
*+*) echo "$1" | sed 's,+,\\\\+,g';;
|
||||||
|
*) echo "$1";;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
find_opt() {
|
find_opt() {
|
||||||
mf=$1
|
mf=$1
|
||||||
sub=$2
|
sub="`no_plus $2`"
|
||||||
shift 2
|
shift 2
|
||||||
case "$sub" in
|
|
||||||
*+*) sub=`echo "$sub" | sed 's,+,\\\\+,g'`;;
|
|
||||||
esac
|
|
||||||
egrep "$@" "^[^#].*[[:space:]]$sub([[:space:]]|\$)" $mf |
|
egrep "$@" "^[^#].*[[:space:]]$sub([[:space:]]|\$)" $mf |
|
||||||
tr '{' '\n' |
|
tr '{' '\n' |
|
||||||
sed -n 's,^MK_\([^}]*\).*,\1,p' |
|
sed -n 's,^MK_\([^}]*\).*,\1,p' |
|
||||||
@ -142,8 +146,9 @@ sort -t= -k2 "$@" | sed 's,/Makefile:PACKAGE=, ,' |
|
|||||||
bname=${reldir##*/}
|
bname=${reldir##*/}
|
||||||
# check parent does not have it commented out
|
# check parent does not have it commented out
|
||||||
# otherwise we should ignore it.
|
# otherwise we should ignore it.
|
||||||
|
# if the parent makefile does not exist, we will skip it.
|
||||||
pmf=$SRCTOP/$dname/Makefile
|
pmf=$SRCTOP/$dname/Makefile
|
||||||
egrep -q "^[^#].*[[:space:]]$bname([[:space:]]|\$)" $pmf || continue
|
egrep -q "^[^#].*[[:space:]]`no_plus $bname`([[:space:]]|\$)" $pmf 2> /dev/null || continue
|
||||||
: reldir=$reldir
|
: reldir=$reldir
|
||||||
case "$reldir" in
|
case "$reldir" in
|
||||||
*lib/*) sub=${reldir#*lib/};;
|
*lib/*) sub=${reldir#*lib/};;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user