From 779e2f6da887729fc513f5efceaa3a3083858c9b Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Fri, 28 Mar 2014 16:39:08 -0700 Subject: [PATCH] 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. --- hg-fast-export.sh | 2 +- hg-reset.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.11.4.GIT