Commit 9e3c730f authored by Vitaly Lipatov's avatar Vitaly Lipatov

egrep -> grep -E

parent a6e078ae
...@@ -182,7 +182,7 @@ __epm_addrepo_deb() ...@@ -182,7 +182,7 @@ __epm_addrepo_deb()
esac esac
# if started from url, use heroistic # if started from url, use heroistic
if echo "$repo" | egrep -q "^https?://" ; then if echo "$repo" | grep -E -q "^https?://" ; then
repo="deb [arch=$ad] $repo" repo="deb [arch=$ad] $repo"
fi fi
......
...@@ -81,7 +81,7 @@ __detect_alt_release_by_repo() ...@@ -81,7 +81,7 @@ __detect_alt_release_by_repo()
{ {
local BRD=$(cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list \ local BRD=$(cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list \
| grep -v "^#" \ | grep -v "^#" \
| egrep "[tpc][5-9]\.?[0-9]?/branch/" \ | grep -E "[tpc][5-9]\.?[0-9]?/branch/" \
| sed -e "s|.*\([tpc][5-9]\.\?[0-9]\?\)/branch.*|\1|g" \ | sed -e "s|.*\([tpc][5-9]\.\?[0-9]\?\)/branch.*|\1|g" \
| sort -u ) | sort -u )
if [ "$(__wcount $BRD)" = "1" ] ; then if [ "$(__wcount $BRD)" = "1" ] ; then
......
...@@ -154,7 +154,7 @@ __epm_restore_pip() ...@@ -154,7 +154,7 @@ __epm_restore_pip()
if [ -n "$dryrun" ] ; then if [ -n "$dryrun" ] ; then
reqmacro="%py3_use" reqmacro="%py3_use"
basename "$req_file" | egrep -q "(dev|test|coverage)" && reqmacro="%py3_buildrequires" basename "$req_file" | grep -E -q "(dev|test|coverage)" && reqmacro="%py3_buildrequires"
echo echo
__epm_restore_print_comment "$req_file" __epm_restore_print_comment "$req_file"
cat $req_file | __epm_restore_convert_to_rpm_notation | sed -e "s|^|$reqmacro |" cat $req_file | __epm_restore_convert_to_rpm_notation | sed -e "s|^|$reqmacro |"
......
...@@ -151,7 +151,7 @@ __epm_search_make_grep() ...@@ -151,7 +151,7 @@ __epm_search_make_grep()
echon " | sed -e \"s| .*||g\"" echon " | sed -e \"s| .*||g\""
fi fi
[ -n "$listN" ] && echon " | egrep -i -v -- \"$listN\"" [ -n "$listN" ] && echon " | grep -E -i -v -- \"$listN\""
# FIXME: The World has not idea how to do grep both string # FIXME: The World has not idea how to do grep both string
# http://stackoverflow.com/questions/10110051/grep-with-two-strings-logical-and-in-regex?rq=1 # http://stackoverflow.com/questions/10110051/grep-with-two-strings-logical-and-in-regex?rq=1
...@@ -160,7 +160,7 @@ __epm_search_make_grep() ...@@ -160,7 +160,7 @@ __epm_search_make_grep()
if [ "$(echo "$list" | wc -w)" -gt 1 ] ; then if [ "$(echo "$list" | wc -w)" -gt 1 ] ; then
for i in $list ; do for i in $list ; do
# FIXME -n on MacOS? # FIXME -n on MacOS?
echon " | egrep -i -- \"$i\"" echon " | grep -E -i -- \"$i\""
done done
fi fi
...@@ -178,7 +178,7 @@ __epm_search_make_grep() ...@@ -178,7 +178,7 @@ __epm_search_make_grep()
# TODO: use some colorifer instead grep (check grep adove too) # TODO: use some colorifer instead grep (check grep adove too)
if [ -n "$list" ] ; then if [ -n "$list" ] ; then
echon " | egrep -i $EGREPCOLOR -- \"($COLO)\"" echon " | grep -E -i $EGREPCOLOR -- \"($COLO)\""
fi fi
} }
......
...@@ -59,8 +59,8 @@ check_tty() ...@@ -59,8 +59,8 @@ check_tty()
check_core_commands check_core_commands
# egrep from busybox may not --color # grep -E from busybox may not --color
# egrep from MacOS print help to stderr # grep -E from MacOS print help to stderr
if grep -E --help 2>&1 | grep -q -- "--color" ; then if grep -E --help 2>&1 | grep -q -- "--color" ; then
export EGREPCOLOR="--color" export EGREPCOLOR="--color"
fi fi
...@@ -210,7 +210,7 @@ isnumber() ...@@ -210,7 +210,7 @@ isnumber()
# copied from strings # copied from strings
# CHECKME: the same like estrlist has ? # CHECKME: the same like estrlist has ?
# Note: used egrep! write '[0-9]+(first|two)', not '[0-9]\+...' # Note: used grep -E! write '[0-9]+(first|two)', not '[0-9]\+...'
rhas() rhas()
{ {
echo "$1" | grep -E -q -- "$2" echo "$1" | grep -E -q -- "$2"
......
...@@ -125,8 +125,8 @@ EOF ...@@ -125,8 +125,8 @@ EOF
# FIXME: we need strict search here (not find gst-plugins-base if search for gst-plugins # FIXME: we need strict search here (not find gst-plugins-base if search for gst-plugins
# TODO: use short? # TODO: use short?
# use verbose for get package status # use verbose for get package status
#pkg_filenames="$pkg-[0-9]" verbose=--verbose __epm_search_internal | egrep "(installed|upgrade)" && continue #pkg_filenames="$pkg-[0-9]" verbose=--verbose __epm_search_internal | grep -E "(installed|upgrade)" && continue
#pkg_filenames="$pkg" verbose=--verbose __epm_search_internal | egrep "(installed|upgrade)" && continue #pkg_filenames="$pkg" verbose=--verbose __epm_search_internal | grep -E "(installed|upgrade)" && continue
(pkg_filenames="$pkg" __epm_search_internal) | grep -q "^$pkg-[0-9]" && continue (pkg_filenames="$pkg" __epm_search_internal) | grep -q "^$pkg-[0-9]" && continue
res=1 res=1
info "Package '$pkg' does not found in repository." info "Package '$pkg' does not found in repository."
......
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