From 16544ffa057c78ed3ff0da3d7f765ae6934aa81d Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Tue, 22 Aug 2006 00:34:13 +0000 Subject: [PATCH] Used the INSTALL_VERBOSE rule to check whether install can use the -v flag. If it can't echo is used to mimic its behavior. --- bin/install_tsc.in | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/bin/install_tsc.in b/bin/install_tsc.in index c2139096c..8850c0d7e 100755 --- a/bin/install_tsc.in +++ b/bin/install_tsc.in @@ -4,6 +4,8 @@ # # Install a file checking the time step first # +# HKM -> openBSD doesn't have a -v option +# if test $# -ne 2 ; then echo 'install_ts ERROR: This program requires 2 and only 2 parameters:' echo ' install_ts source DEST_DIR' @@ -12,6 +14,14 @@ fi lh=$1 INCDIR=$2 # +VERBOSE=@INSTALL_VERBOSE@ +verbose='y' +if test "x$VERBOSE" = "x-v" ; then + verbose= +fi +INSTALL_XV="@INSTALL_abs@ -m 755 $VERBOSE " +INSTALL_V="@INSTALL_abs@ -m 644 $VERBOSE " +# # If the destination directory doesn't exist yet, create it # if test ! -d $INCDIR ; then @@ -24,9 +34,12 @@ if test ! -f "${lh}" ; then fi if test ! -f "${th}" ; then if test -x "${lh}" ; then - @INSTALL_abs@ -m 755 -v "${lh}" "${th}" + $INSTALL_XV "${lh}" "${th}" else - @INSTALL_abs@ -m 644 -v "${lh}" "${th}" + $INSTALL_V "${lh}" "${th}" + fi + if test x"$verbose" = xy ; then + echo "${lh}" ' -> ' "${th}" fi else # if test "${lh}" -nt "${th}" ; then @@ -34,9 +47,12 @@ else res=$? if test "$res" = "0" ; then if test -x "${lh}" ; then - @INSTALL_abs@ -m 755 -v "${lh}" "${th}" + $INSTALL_XV "${lh}" "${th}" else - @INSTALL_abs@ -m 644 -v "${lh}" "${th}" + $INSTALL_V "${lh}" "${th}" + fi + if test x"$verbose" = xy ; then + echo "${lh}" ' -> ' "${th}" fi fi fi