automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: install-sh -C


From: Akim Demaille
Subject: Re: install-sh -C
Date: Fri, 27 Oct 2006 09:57:36 +0200


Le 25 oct. 06 à 18:04, Stepan Kasal a écrit :

Hello,

On Wed, Oct 25, 2006 at 05:35:31PM +0200, Akim Demaille wrote:
 find stampfile -newer $file

indeed, according to the documentation, the predicate is true if
stampfile is strictly newer than $file.  So the implementation would
have to be something like:

# is_younger FILE FILES
# ---------------------
# Check that FILE is younger than all the FILES.
#
is_younger ()
{
  a_status=0
  a_file=$1
  shift
  for a_f in "$@"
  do
    a_list=`find "$a_file" -newer "$a_f"`
    if test x"$a_list" != x"$a_file"; then
      a_status=1; break
    else :
    fi
  done
  return $a_status
}

Was something wrong with my proposal?

# is_younger FILE FILES
# ---------------------
# Check that FILE is younger than all the FILES.
is_younger ()
{
  test x`find "$@" -newer "$1"` = x
  return $?
}





reply via email to

[Prev in Thread] Current Thread [Next in Thread]