Commit d3c01504 authored by Vitaly Lipatov's avatar Vitaly Lipatov

egrep -> grep -E

parent df334429
......@@ -68,7 +68,7 @@ get_test_status()
# get subtask number from TASKNUMBER for PROJECTNAME
get_subtask()
{
ssh $GEARHOST task show $1 | egrep "(/$2.git|:package=$2$|:srpm=$2-.*src.rpm)" | sed -e "s|^ \([0-9]*\):.*|\1|g"
ssh $GEARHOST task show $1 | grep -E "(/$2.git|:package=$2$|:srpm=$2-.*src.rpm)" | sed -e "s|^ \([0-9]*\):.*|\1|g"
}
......
......@@ -148,7 +148,7 @@ trans_rpmdeps_to_pkgname_lav()
TFILE=$(make_temp_file)
PKGFILES=
if [ -n "$REQCONVLIST" ] ; then
PKGFILES=$(LANG=C apt-get install --print-uris $REQCONVLIST 2>$TFILE | egrep "(^Selecting|.* is already the newest version.)" | sed -e "s|^Selecting ||g" | sed -e "s| is already the newest version.||g" | sed -e "s| .*||g" | sort -u | filter_pkgname) || warning "Error return code from apt-get install"
PKGFILES=$(LANG=C apt-get install --print-uris $REQCONVLIST 2>$TFILE | grep -E "(^Selecting|.* is already the newest version.)" | sed -e "s|^Selecting ||g" | sed -e "s| is already the newest version.||g" | sed -e "s| .*||g" | sort -u | filter_pkgname) || warning "Error return code from apt-get install"
if grep -q "is a virtual package provided by" $TFILE ; then
local INSTALLMARK="\[Installed\]"
if ! grep -q "$INSTALLMARK" $TFILE ; then
......
......@@ -82,8 +82,8 @@ check_spec()
#cat $SPEC | sed -e "s|^# Source-\(.*\):\([ \t]\)|%define rpmurl_source_\1\2|g" > $SPEC.rpmurl
#local NEWSOURCE=
#eval_spec $SPEC.rpmurl >$SPEC.rpmuuu
#if eval_spec $SPEC.rpmurl | egrep -q "%define rpmurl_source_(git|url)" ; then
# NEWSOURCE=$(eval_spec $SPEC.rpmurl | egrep "%define rpmurl_source_(git|url)" | sed -e "s/.*[ \t]\(.*\)/\1/g")
#if eval_spec $SPEC.rpmurl | grep -E -q "%define rpmurl_source_(git|url)" ; then
# NEWSOURCE=$(eval_spec $SPEC.rpmurl | grep -E "%define rpmurl_source_(git|url)" | sed -e "s/.*[ \t]\(.*\)/\1/g")
# echo $NEWSOURCE
#fi
#rm -f $SPEC.rpmurl
......
......@@ -15,7 +15,7 @@ is_alt()
set_target_type()
{
# check for M51 and so on
if echo "$1" | egrep -q "^M[0-9][0-9].?$" ; then
if echo "$1" | grep -E -q "^M[0-9][0-9].?$" ; then
MENV="$1"
return 0
fi
......@@ -32,25 +32,25 @@ set_target_type()
get_type_by_git_branch_name()
{
# like p5
if echo $1 | egrep -q "^[ptc][0-9].?$" ; then
if echo $1 | grep -E -q "^[ptc][0-9].?$" ; then
get_altdistr_mod $1
return
fi
# like p10
if echo $1 | egrep -q "^[ptc]1[0-9].?$" ; then
if echo $1 | grep -E -q "^[ptc]1[0-9].?$" ; then
get_altdistr_mod $1
return
fi
# like cert6
if echo $1 | egrep -q "^cert[0-9].?$" ; then
if echo $1 | grep -E -q "^cert[0-9].?$" ; then
get_altdistr_mod $1
return
fi
# like M50P or M41
if echo $1 | egrep -q "^M[0-9][0-9].?$" ; then
if echo $1 | grep -E -q "^M[0-9][0-9].?$" ; then
echo $1
return
fi
......
......@@ -55,10 +55,10 @@ get_tardir_from_rules()
local dir
assert_var tar packname
# firstly try get dir by name=
dir=$(print_gear_rules | grep "$tar *:" | egrep "name=$packname([[:space:]]|$)" | sed -e "s|$tar *: *||g" | sed -e "s| .*||g" | head -n1) #"
dir=$(print_gear_rules | grep "$tar *:" | grep -E "name=$packname([[:space:]]|$)" | sed -e "s|$tar *: *||g" | sed -e "s| .*||g" | head -n1) #"
# if can't get by name, try get by name from rule without name=
if [ -z "$dir" ] ; then
dir=$(print_gear_rules | egrep "$tar *: *$packnamewov([[:space:]]|$)" | sed -e "s|$tar *: *||g" | sed -e "s| .*||g" | head -n1) #"
dir=$(print_gear_rules | grep -E "$tar *: *$packnamewov([[:space:]]|$)" | sed -e "s|$tar *: *||g" | sed -e "s| .*||g" | head -n1) #"
fi
# if can't get by name, use first rule without name=
if [ -z "$dir" ] ; then
......
......@@ -155,8 +155,8 @@ clean_pkgreq()
local i VAR
VAR=`cat | sort -u`
for i in $VAR ; do
#echo "$i" | egrep "^gcc[0-9]|^cpp[0-9]|^gcc-c++[0-9]" >/dev/null && continue
#echo "$i" | egrep "gcc\$|cpp\$|gcc-c++\$" >/dev/null && continue
#echo "$i" | grep -E "^gcc[0-9]|^cpp[0-9]|^gcc-c++[0-9]" >/dev/null && continue
#echo "$i" | grep -E "gcc\$|cpp\$|gcc-c++\$" >/dev/null && continue
echo "$i" | grep "[()<=>]" >/dev/null && continue
echo "$i" | grep "^ *[0-9]\.[0-9]" >/dev/null && continue
echo -n "$i " | sed -e "s|[,}]| |g"
......
......@@ -11,10 +11,10 @@ isnumber()
}
# the same like estrlist match (reg_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" | egrep -q -- "$2"
echo "$1" | grep -E -q -- "$2"
}
......
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