Commit ee111341 authored by Anton Midyukov's avatar Anton Midyukov

Replace 'egrep' to 'grep -E'

Fix 'warning: egrep is obsolescent; using grep -E'
parent ccc6861d
......@@ -44,7 +44,7 @@ contemplate_dirs()
# hasher emits no meaningful errors regarding those, sigh
check_options()
{
! egrep -q "^$1 $2 .*no(dev|exec)" /proc/mounts
! grep -E -q "^$1 $2 .*no(dev|exec)" /proc/mounts
}
# pick existing, writeable, >256M free space dirs
......
......@@ -33,4 +33,4 @@ transformed="$(sed \
[ -z "$transformed" ] ||
find $transformed \
| sed 's,^\./,,' \
| egrep -v '(\.sw.|~)$'
| grep -E -v '(\.sw.|~)$'
......@@ -19,7 +19,7 @@ cd /usr/share/X11/locale &&
# xkb; don't drop "pc" yet
cd /usr/share/X11/xkb/symbols &&
ls \
| egrep -v 'by|en|kz|pt|ru|ua|us|pc|....*' \
| grep -E -v 'by|en|kz|pt|ru|ua|us|pc|....*' \
| xargs rm -rf --
# gconv
......@@ -30,7 +30,7 @@ cd /usr/lib*/gconv &&
for dir in /usr/{lib*,share}/locale; do
cd "$dir" && \
ls \
| egrep -v '^be|en|kk|pt|ru|uk' \
| grep -E -v '^be|en|kk|pt|ru|uk' \
| xargs rm -rf --;
done
......
......@@ -19,7 +19,7 @@ switch() {
sname="${sname%.socket}"
[ -n "$CHECK_FILES" ] && \
egrep -qs "^[[:blank:]]*$sname(.service|.socket)?[[:blank:]]*$" \
grep -E -qs "^[[:blank:]]*$sname(.service|.socket)?[[:blank:]]*$" \
$CHECK_FILES && return ||:
# avoid service duplication: drop sevice without unit type
......
......@@ -11,7 +11,7 @@ USER=altlinux
add_nopasswdlogin_group()
{
[ -f "/etc/pam.d/$1" ] &&
egrep -qs '^auth.+user[[:blank:]]+ingroup[[:blank:]]+nopasswdlogin' "/etc/pam.d/$1" &&
grep -E -qs '^auth.+user[[:blank:]]+ingroup[[:blank:]]+nopasswdlogin' "/etc/pam.d/$1" &&
groupadd -r nopasswdlogin &&
gpasswd -a "$USER" nopasswdlogin
}
......
......@@ -115,7 +115,7 @@ build-image: profile/populate
fi; \
tail -n $(MAX_LINES) "$(BUILDLOG)" \
| GREP_COLOR="$(ANSI_FAIL)" \
egrep --color=auto -m "$(MAX_ERRORS)" "$(GOTCHA)"; \
grep -E --color=auto -m "$(MAX_ERRORS)" "$(GOTCHA)"; \
df -P $(BUILDDIR) | awk 'END { if ($$4 < $(LOWSPACE)) \
{ print "NB: low space on "$$6" ("$$5" used)"}}'; \
fi; \
......
......@@ -56,7 +56,7 @@ profile/init: distclean
SOURCELIST Dir::Etc::sourcelist/f \
SOURCEPARTS Dir::Etc::sourceparts/d`; \
find "$$SOURCEPARTS" -mindepth 1 -maxdepth 1 -name '*.list' \
| xargs egrep -hv -e '^#|^[[:blank:]]*$$' -- "$$SOURCELIST" \
| xargs grep -E -hv -e '^#|^[[:blank:]]*$$' -- "$$SOURCELIST" \
| tee $(BUILDDIR)/sources.list; \
echo; \
} $(LOG); \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment