From: Kyle J. McKay Date: Fri, 28 Mar 2014 23:39:08 +0000 (-0700) Subject: hg-fast-export.sh/hg-reset.sh: replace egrep with grep X-Git-Url: http://crossforests.com/gitweb?a=commitdiff_plain;h=779e2f6da887729fc513f5efceaa3a3083858c9b;p=python%2Ffast-export.git hg-fast-export.sh/hg-reset.sh: replace egrep with grep According to the POSIX standard, egrep is an obsolescent equivalent of grep -E. In fact, the patterns actually being used with egrep do not require use of extended regular expressions at all, so a plain 'grep' can be used rather than 'grep -E'. Replace egrep with grep to improve compatibility across systems. --- diff --git a/hg-fast-export.sh b/hg-fast-export.sh index 1d84093..a21c61f 100755 --- a/hg-fast-export.sh +++ b/hg-fast-export.sh @@ -71,7 +71,7 @@ done # for convenience: get default repo from state file if [ x"$REPO" = x -a -f "$GIT_DIR/$PFX-$SFX_STATE" ] ; then - REPO="`egrep '^:repo ' "$GIT_DIR/$PFX-$SFX_STATE" | cut -d ' ' -f 2`" + REPO="`grep '^:repo ' "$GIT_DIR/$PFX-$SFX_STATE" | cut -d ' ' -f 2`" echo "Using last hg repository \"$REPO\"" fi diff --git a/hg-reset.sh b/hg-reset.sh index c77c291..7fbacdf 100755 --- a/hg-reset.sh +++ b/hg-reset.sh @@ -47,7 +47,7 @@ done # for convenience: get default repo from state file if [ x"$REPO" = x -a -f "$GIT_DIR/$PFX-$SFX_STATE" ] ; then - REPO="`egrep '^:repo ' "$GIT_DIR/$PFX-$SFX_STATE" | cut -d ' ' -f 2`" + REPO="`grep '^:repo ' "$GIT_DIR/$PFX-$SFX_STATE" | cut -d ' ' -f 2`" echo "Using last hg repository \"$REPO\"" fi