[m-rev.] diff: avoid another problem with expr on freebsd

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Dec 2 14:36:07 AEDT 2010


Branches: main, 10.04

Avoid another problem with expr on FreeBSD.

scripts/parse_ml_options.sh-subr.in:
 	Avoid invoking expr with a first argument that has a leading
 	minus sign.

Julien.

Index: scripts/parse_ml_options.sh-subr.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/scripts/parse_ml_options.sh-subr.in,v
retrieving revision 1.13
diff -u -r1.13 parse_ml_options.sh-subr.in
--- scripts/parse_ml_options.sh-subr.in	23 Dec 2007 23:57:19 -0000	1.13
+++ scripts/parse_ml_options.sh-subr.in	2 Dec 2010 03:30:29 -0000
@@ -373,7 +373,7 @@
  		shift
  		;;
  	-R*)
-		dir="` expr $1 : '-R\(.*\)' `"
+		dir="` expr X$1 : 'X-R\(.*\)' `"
  		case $leave_shlib_dirs_relative in false)
  			case "$dir" in
  				/*) ;;

--------------------------------------------------------------------------
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