Changeset 911 in MondoRescue for branches/stable/contrib


Ignore:
Timestamp:
Nov 1, 2006, 7:46:51 PM (17 years ago)
Author:
Bruno Cornec
Message:
Further removal of all instances of grep -wx in code.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/contrib/mkcd/setup

    r355 r911  
    150150    fi
    151151
    152     res=`cat /etc/issue.net 2>/dev/null | fgrep -i turbolinux | head -n1`
     152    res=`cat /etc/issue.net 2>/dev/null | grep -i turbolinux | head -n1`
    153153    if [ "$res" != "" ] ; then
    154154    echo "$res"
     
    156156    fi
    157157
    158     for fname in `find /etc -maxdepth 1 | fgrep release` /etc/issue.net ; do
    159         res=`cat $fname 2>/dev/null | fgrep -i "linux" | head -n1 | tr -s '\t' ' '`
     158    for fname in `find /etc -maxdepth 1 | grep release` /etc/issue.net ; do
     159        res=`cat $fname 2>/dev/null | grep -i "linux" | head -n1 | tr -s '\t' ' '`
    160160        [ "$res" = "" ] && res=`cat $fname |head -n1 | tr -s '\t' ' '`
    161161        if [ "$res" != "" ] ; then
     
    230230        [ "`echo "$i" | grep mindi`" ] && qq=head || qq=tail
    231231        j=`find $1/ -type f -maxdepth 1 | grep "$i" | $qq -n1`
    232         [ ! "$j" ] && j=`find RPMS/ -type f -maxdepth 1 | fgrep "$i" | $qq -n1`
     232        [ ! "$j" ] && j=`find RPMS/ -type f -maxdepth 1 | grep -F "$i" | $qq -n1`
    233233        if [ ! "$j" ] ; then
    234234        echo "Looking for $i" >> /dev/stderr
     
    254254        if echo "$j" | grep "\-$blah" &> /dev/null ; then
    255255        k=`echo "$j" | cut -d'-' -f1,2`
    256         if echo "$j" | grep -x "[A-Z,a-Z]*-[A-Z,a-Z]*-[A-Z,a-z]*-.*" &> /dev/null ; then
     256        if echo "$j" | grep -E '^[A-Z,a-Z]*-[A-Z,a-Z]*-[A-Z,a-z]*-.*$' &> /dev/null ; then
    257257            k=`echo "$j" | cut -d'-' -f1,2,3`
    258258        fi
     
    279279#    echo "banner = $banner" >> /dev/stderr
    280280    for i in $banner ; do
    281     j=`echo $i | grep -x "[v|V][0-9]+*.*"`
    282     [ ! "$j" ] && j=`echo $i | grep -x "[0-9]+*.*"`
    283     echo "$j" | grep -x "[0-9]*)" > /dev/null && continue
     281    j=`echo $i | grep -E '^[v|V][0-9]+*.*$'`
     282    [ ! "$j" ] && j=`echo $i | grep -E '^[0-9]+*.*$'`
     283    echo "$j" | grep -E '^[0-9]*)$' > /dev/null && continue
    284284    [ "$j" ] && res=`echo $j | sed s/v// | sed s/V//`
    285285    done
     
    610610
    611611StrStr() {
    612   [ "`echo "$1" | fgrep -i "$2"`" ] && return 0 || return 1
     612  [ "`echo "$1" | grep -Fi "$2"`" ] && return 0 || return 1
    613613}
    614614
     
    674674echo -en "Do you want to install the (S)table or the (D)evelopment branch of Mondo? "
    675675read ch
    676 if [ "`echo "development" | fgrep -i "$ch"`" ] ; then
     676if [ "`echo "development" | grep -Fi "$ch"`" ] ; then
    677677    MY_BRANCH=$DEVEL_BRANCH
    678678    MINDI_BRANCH=1.1
     
    703703    echo -en "Shall I do that (y/n)? "
    704704    read ch
    705     if [ "`echo "YESyesYes" | fgrep "$ch"`" ] ; then
     705    if [ "`echo "YESyesYes" | grep -F "$ch"`" ] ; then
    706706        distro=RHT
    707707        version=7.2
Note: See TracChangeset for help on using the changeset viewer.