From fb770085ce9b54451589585b1d4be253dc982c43 Mon Sep 17 00:00:00 2001 From: rmanfredi Date: Tue, 7 Feb 2012 17:44:54 +0000 Subject: The -s command can change some parts of the exe on Cygwin, so cannot use cmp. Use a size comparison only to check whether the install program strips. git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@122 2592e710-e01b-42a5-8df0-11608a6cc53d --- mcon/U/install.U | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mcon/U/install.U b/mcon/U/install.U index 5b4fdf9..aec3b0c 100644 --- a/mcon/U/install.U +++ b/mcon/U/install.U @@ -16,7 +16,7 @@ ?RCS: patch45: created ?RCS: ?MAKE:install installdir: Loc Oldconfig Getfile cat test startsh rm +cc \ - eunicefix package contains mkdir echo n c + eunicefix package contains mkdir echo n c awk wc ?MAKE: -pick add $@ %< ?S:install: ?S: This variable contains the name of an install program that can accept @@ -35,7 +35,7 @@ ?S: resort, setting the variable to './install -d'. Otherwise, it is set to ?S: plain 'mkdir', and cross your fingers! ?S:. -?T:dir file tryit prog creatdir either +?T:dir file tryit prog creatdir either try_wc d_try_wc tryns_wc d_tryns_wc ?F:!tryinst : locate a BSD compatible install program echo " " @@ -91,7 +91,12 @@ EOS fi @end (ls -l d/try >try.ls; ls -l d/try.ns >tryno.ls) 2>/dev/null - if (cmp -s d/try try && cmp -s d/try.ns try.ns && \ + try_wc=`$wc -c try | $awk '{ print $1}' 2>/dev/null` + tryns_wc=`$wc -c try.ns | $awk '{ print $1}' 2>/dev/null` + d_try_wc=`$wc -c d/try | $awk '{ print $1}' 2>/dev/null` + d_tryns_wc=`$wc -c d/try.ns | $awk '{ print $1}' 2>/dev/null` + if ($test "X$try_wc" = "X$d_try_wc" && \ + $test "X$tryns_wc" = "X$d_tryns_wc" && \ $contains 'rwxrw-r--' tryno.ls && \ $contains 'rw-r---w-' try.ls) >/dev/null 2>&1 then -- cgit v1.2.3