[m-rev.] diff: make bootcheck script work on freebsd
Julien Fischer
juliensf at csse.unimelb.edu.au
Thu Dec 2 15:23:01 AEDT 2010
Branches: main, 10.04
tools/bootcheck:
Avoid problems with expr on freebsd.
Julien.
Index: tools/bootcheck
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.208
diff -u -r1.208 bootcheck
--- tools/bootcheck 24 Feb 2010 07:04:43 -0000 1.208
+++ tools/bootcheck 2 Dec 2010 04:20:32 -0000
@@ -261,7 +261,7 @@
-d|--test-dir)
testdirs="$testdirs $2"; shift ;;
-d*)
- testdirs="$testdirs ` expr $1 : '-d\(.*\)' `"; ;;
+ testdirs="$testdirs ` expr X$1 : 'X-d\(.*\)' `"; ;;
-e|--extras)
extras=true ;;
@@ -285,9 +285,9 @@
-j|--jobs)
jfactor="-j$2"; shift ;;
-j*)
- jfactor="-j` expr $1 : '-j\(.*\)' `" ;;
+ jfactor="-j` expr X$1 : X'-j\(.*\)' `" ;;
--jobs*)
- jfactor="--jobs` expr $1 : '--jobs\(.*\)' `" ;;
+ jfactor="--jobs` expr X$1 : 'X--jobs\(.*\)' `" ;;
-k|--keep-objs)
keep_objs=true ;;
@@ -298,7 +298,7 @@
-o|--output-file)
outfile="$2"; shift ;;
-o*)
- outfile="` expr $1 : '-o\(.*\)' `"; ;;
+ outfile="` expr X$1 : 'X-o\(.*\)' `"; ;;
--target)
case "$2" in
@@ -310,7 +310,7 @@
-G|--grade)
grade="$2"; shift ;;
-G*)
- grade="` expr $1 : '-G\(.*\)' `"; ;;
+ grade="` expr X$1 : 'X-G\(.*\)' `"; ;;
--gradedir)
use_gradedir=true; grade="$2"; shift ;;
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list