xbps-src: don't use deprecated egrep

grep 3.8 now prints a warning that egrep is deprecated and we should use
grep -E instead
This commit is contained in:
Michal Vasilek 2022-10-18 00:57:46 +02:00
parent a0e505865b
commit fe352426bd
1 changed files with 2 additions and 2 deletions

View File

@ -25,9 +25,9 @@ setup_pkg_depends() {
_pkgname=$(xbps-uhelper getpkgname $_depname 2>/dev/null) _pkgname=$(xbps-uhelper getpkgname $_depname 2>/dev/null)
[ -z "$_pkgname" ] && _pkgname="$_depname" [ -z "$_pkgname" ] && _pkgname="$_depname"
if [ -s ${XBPS_DISTDIR}/etc/virtual ]; then if [ -s ${XBPS_DISTDIR}/etc/virtual ]; then
foo=$(egrep "^${_pkgname}[[:blank:]]" ${XBPS_DISTDIR}/etc/virtual|cut -d ' ' -f2) foo=$(grep -E "^${_pkgname}[[:blank:]]" ${XBPS_DISTDIR}/etc/virtual|cut -d ' ' -f2)
elif [ -s ${XBPS_DISTDIR}/etc/defaults.virtual ]; then elif [ -s ${XBPS_DISTDIR}/etc/defaults.virtual ]; then
foo=$(egrep "^${_pkgname}[[:blank:]]" ${XBPS_DISTDIR}/etc/defaults.virtual|cut -d ' ' -f2) foo=$(grep -E "^${_pkgname}[[:blank:]]" ${XBPS_DISTDIR}/etc/defaults.virtual|cut -d ' ' -f2)
fi fi
if [ -z "$foo" ]; then if [ -z "$foo" ]; then
msg_error "$pkgver: failed to resolve virtual dependency for '$j' (missing from etc/virtual)\n" msg_error "$pkgver: failed to resolve virtual dependency for '$j' (missing from etc/virtual)\n"