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

egrep -> grep -E

parent a6e078ae
......@@ -182,7 +182,7 @@ __epm_addrepo_deb()
esac
# 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"
fi
......
......@@ -81,7 +81,7 @@ __detect_alt_release_by_repo()
{
local BRD=$(cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list \
| 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" \
| sort -u )
if [ "$(__wcount $BRD)" = "1" ] ; then
......
......@@ -154,7 +154,7 @@ __epm_restore_pip()
if [ -n "$dryrun" ] ; then
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
__epm_restore_print_comment "$req_file"
cat $req_file | __epm_restore_convert_to_rpm_notation | sed -e "s|^|$reqmacro |"
......
......@@ -151,7 +151,7 @@ __epm_search_make_grep()
echon " | sed -e \"s| .*||g\""
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
# http://stackoverflow.com/questions/10110051/grep-with-two-strings-logical-and-in-regex?rq=1
......@@ -160,7 +160,7 @@ __epm_search_make_grep()
if [ "$(echo "$list" | wc -w)" -gt 1 ] ; then
for i in $list ; do
# FIXME -n on MacOS?
echon " | egrep -i -- \"$i\""
echon " | grep -E -i -- \"$i\""
done
fi
......@@ -178,7 +178,7 @@ __epm_search_make_grep()
# TODO: use some colorifer instead grep (check grep adove too)
if [ -n "$list" ] ; then
echon " | egrep -i $EGREPCOLOR -- \"($COLO)\""
echon " | grep -E -i $EGREPCOLOR -- \"($COLO)\""
fi
}
......
......@@ -59,8 +59,8 @@ check_tty()
check_core_commands
# egrep from busybox may not --color
# egrep from MacOS print help to stderr
# grep -E from busybox may not --color
# grep -E from MacOS print help to stderr
if grep -E --help 2>&1 | grep -q -- "--color" ; then
export EGREPCOLOR="--color"
fi
......@@ -210,7 +210,7 @@ isnumber()
# copied from strings
# 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()
{
echo "$1" | grep -E -q -- "$2"
......
......@@ -125,8 +125,8 @@ EOF
# FIXME: we need strict search here (not find gst-plugins-base if search for gst-plugins
# TODO: use short?
# use verbose for get package status
#pkg_filenames="$pkg-[0-9]" verbose=--verbose __epm_search_internal | egrep "(installed|upgrade)" && continue
#pkg_filenames="$pkg" 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 | grep -E "(installed|upgrade)" && continue
(pkg_filenames="$pkg" __epm_search_internal) | grep -q "^$pkg-[0-9]" && continue
res=1
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