OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /e/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-tools Date: 12-Oct-2004 13:31:44
Branch: HEAD Handle: 2004101212314400
Modified files:
openpkg-tools/cmd dev.sh
Log:
add functional safety check for egrep(1) and awk(1)
Summary:
Revision Changes Path
1.30 +12 -0 openpkg-tools/cmd/dev.sh
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-tools/cmd/dev.sh
============================================================================
$ cvs diff -u -r1.29 -r1.30 dev.sh
--- openpkg-tools/cmd/dev.sh 20 Sep 2004 18:07:40 -0000 1.29
+++ openpkg-tools/cmd/dev.sh 12 Oct 2004 11:31:44 -0000 1.30
@@ -2489,6 +2489,18 @@
set -- help
fi
+# check whether EGREP really supports regular expressions
+if [ ! .`echo foo | ${EGREP} '^f[nop]+$'` = .foo ]; then
+ error "$0:ERROR: found ${EGREP} but it doesn't support regular expressions"
+ exit 1
+fi
+
+# check whether AWK supports -v var=val option
+if [ ! .`echo foo | ${AWK} -vfoo=bar '/foo/ { print foo }'` = .bar ]; then
+ error "$0:ERROR: found ${AWK} but it doesn't support -v var=val option"
+ exit 1
+fi
+
# when invoked without any parameter, artifically inject "bash" command as default
if [ $# -eq 0 ]; then
set -- bash
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [EMAIL PROTECTED]