From: keie Date: Fri, 11 Jan 1985 16:46:02 +0000 (+0000) Subject: Allows optional second argument. X-Git-Tag: release-5-5~5778 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=d72ad93216873f1aae2babd718eb61f7af34401b;p=ack.git Allows optional second argument. This is the name of the destination file. The destination directory is determined by compare. --- diff --git a/mach/compare b/mach/compare index 32b8be1be..fc54003f9 100755 --- a/mach/compare +++ b/mach/compare @@ -1,2 +1,7 @@ +case $# in +1) DEST="$1" ;; +2) DEST="$2" ;; +*) echo $0 [source] destination ;; +esac MACH=`(cd .. ; basename \`pwd\`)` -cmp $1 ../../../lib/${MACH}/$1 +cmp "$1" ../../../lib/${MACH}/$DEST