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() ...@@ -44,7 +44,7 @@ contemplate_dirs()
# hasher emits no meaningful errors regarding those, sigh # hasher emits no meaningful errors regarding those, sigh
check_options() 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 # pick existing, writeable, >256M free space dirs
......
...@@ -33,4 +33,4 @@ transformed="$(sed \ ...@@ -33,4 +33,4 @@ transformed="$(sed \
[ -z "$transformed" ] || [ -z "$transformed" ] ||
find $transformed \ find $transformed \
| sed 's,^\./,,' \ | sed 's,^\./,,' \
| egrep -v '(\.sw.|~)$' | grep -E -v '(\.sw.|~)$'
...@@ -19,7 +19,7 @@ cd /usr/share/X11/locale && ...@@ -19,7 +19,7 @@ cd /usr/share/X11/locale &&
# xkb; don't drop "pc" yet # xkb; don't drop "pc" yet
cd /usr/share/X11/xkb/symbols && cd /usr/share/X11/xkb/symbols &&
ls \ 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 -- | xargs rm -rf --
# gconv # gconv
...@@ -30,7 +30,7 @@ cd /usr/lib*/gconv && ...@@ -30,7 +30,7 @@ cd /usr/lib*/gconv &&
for dir in /usr/{lib*,share}/locale; do for dir in /usr/{lib*,share}/locale; do
cd "$dir" && \ cd "$dir" && \
ls \ ls \
| egrep -v '^be|en|kk|pt|ru|uk' \ | grep -E -v '^be|en|kk|pt|ru|uk' \
| xargs rm -rf --; | xargs rm -rf --;
done done
......
...@@ -19,7 +19,7 @@ switch() { ...@@ -19,7 +19,7 @@ switch() {
sname="${sname%.socket}" sname="${sname%.socket}"
[ -n "$CHECK_FILES" ] && \ [ -n "$CHECK_FILES" ] && \
egrep -qs "^[[:blank:]]*$sname(.service|.socket)?[[:blank:]]*$" \ grep -E -qs "^[[:blank:]]*$sname(.service|.socket)?[[:blank:]]*$" \
$CHECK_FILES && return ||: $CHECK_FILES && return ||:
# avoid service duplication: drop sevice without unit type # avoid service duplication: drop sevice without unit type
......
...@@ -11,7 +11,7 @@ USER=altlinux ...@@ -11,7 +11,7 @@ USER=altlinux
add_nopasswdlogin_group() add_nopasswdlogin_group()
{ {
[ -f "/etc/pam.d/$1" ] && [ -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 && groupadd -r nopasswdlogin &&
gpasswd -a "$USER" nopasswdlogin gpasswd -a "$USER" nopasswdlogin
} }
......
...@@ -115,7 +115,7 @@ build-image: profile/populate ...@@ -115,7 +115,7 @@ build-image: profile/populate
fi; \ fi; \
tail -n $(MAX_LINES) "$(BUILDLOG)" \ tail -n $(MAX_LINES) "$(BUILDLOG)" \
| GREP_COLOR="$(ANSI_FAIL)" \ | 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)) \ df -P $(BUILDDIR) | awk 'END { if ($$4 < $(LOWSPACE)) \
{ print "NB: low space on "$$6" ("$$5" used)"}}'; \ { print "NB: low space on "$$6" ("$$5" used)"}}'; \
fi; \ fi; \
......
...@@ -56,7 +56,7 @@ profile/init: distclean ...@@ -56,7 +56,7 @@ profile/init: distclean
SOURCELIST Dir::Etc::sourcelist/f \ SOURCELIST Dir::Etc::sourcelist/f \
SOURCEPARTS Dir::Etc::sourceparts/d`; \ SOURCEPARTS Dir::Etc::sourceparts/d`; \
find "$$SOURCEPARTS" -mindepth 1 -maxdepth 1 -name '*.list' \ 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; \ | tee $(BUILDDIR)/sources.list; \
echo; \ echo; \
} $(LOG); \ } $(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