source: vendor/automake/1.4-p6/acinstall@ 3607

Last change on this file since 3607 was 3124, checked in by bird, 18 years ago

automake 1.4-p6

File size: 886 bytes
Line 
1#! /bin/sh
2
3# Install an aclocal-style M4 file. A script is needed to do this
4# because we want to do serial-number checking; newer versions of
5# macro files should always be preferred.
6
7# Usage:
8# acinstall file directory installprogram [install-args]...
9
10file="$1"
11dir="$2"
12shift
13shift
14
15localserial=`grep '^# serial ' $file | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'`
16if test -z "$localserial"; then
17 echo "acinstall: no serial number in $file" 1>&2
18 exit 1
19fi
20
21# Maybe if the installed file has no serial number we should just
22# assume it is ancient.
23instserial=`grep '^# serial ' $dir/$file | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'`
24if test -z "$instserial"; then
25 echo "acinstall: no serial number in $dir/$file" 1>&2
26 exit 1
27fi
28
29if test $localserial -lt $instserial; then
30 # Installed file is newer.
31 exit 0
32fi
33
34# Install the file.
35$* $file $dir/$file
Note: See TracBrowser for help on using the repository browser.