INSTALL: set defaults for awk and egrep
Set defaults for `awk` and `egrep`, instead of setting things multiple times when specializing on OS, and using a default in a `case` statement. This is cleaner and less error-prone.
This commit is contained in:
8
INSTALL
8
INSTALL
@@ -37,6 +37,8 @@ PATH=/bin:/usr/bin:$PLAN9/bin:$PATH export PATH
|
|||||||
[ -z "$PLAN9_TARGET" ] && PLAN9_TARGET="$PLAN9"
|
[ -z "$PLAN9_TARGET" ] && PLAN9_TARGET="$PLAN9"
|
||||||
export PLAN9_TARGET
|
export PLAN9_TARGET
|
||||||
|
|
||||||
|
egrep=egrep
|
||||||
|
awk=awk
|
||||||
case `uname` in
|
case `uname` in
|
||||||
SunOS)
|
SunOS)
|
||||||
awk=nawk
|
awk=nawk
|
||||||
@@ -63,16 +65,10 @@ DragonFly|*BSD)
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
echo "CFLAGS='-pthread'" >> $PLAN9/config
|
echo "CFLAGS='-pthread'" >> $PLAN9/config
|
||||||
awk=awk
|
|
||||||
;;
|
;;
|
||||||
*Linux*)
|
*Linux*)
|
||||||
awk=awk
|
|
||||||
egrep='grep -E'
|
egrep='grep -E'
|
||||||
;;
|
;;
|
||||||
*)
|
|
||||||
egrep=egrep
|
|
||||||
awk=awk
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
echo "egrep='$egrep'" >>$PLAN9/config
|
echo "egrep='$egrep'" >>$PLAN9/config
|
||||||
|
|||||||
Reference in New Issue
Block a user