head	1.9;
access;
symbols
	perseant-exfatfs-base-20261102:1.9
	netbsd-11-1-RELEASE:1.9
	netbsd-10-2-RELEASE:1.9
	netbsd-9-5-RELEASE:1.7
	netbsd-11-0-RELEASE:1.9
	netbsd-11-0-RC7:1.9
	netbsd-11-0-RC6:1.9
	netbsd-11-0-RC5:1.9
	netbsd-11-0-RC4:1.9
	netbsd-11-0-RC3:1.9
	netbsd-11-0-RC2:1.9
	netbsd-11-0-RC1:1.9
	perseant-exfatfs-base-20250801:1.9
	netbsd-11:1.9.0.6
	netbsd-11-base:1.9
	netbsd-10-1-RELEASE:1.9
	perseant-exfatfs-base-20240630:1.9
	perseant-exfatfs:1.9.0.4
	perseant-exfatfs-base:1.9
	netbsd-8-3-RELEASE:1.7
	netbsd-9-4-RELEASE:1.7
	netbsd-10-0-RELEASE:1.9
	netbsd-10-0-RC6:1.9
	netbsd-10-0-RC5:1.9
	netbsd-10-0-RC4:1.9
	netbsd-10-0-RC3:1.9
	netbsd-10-0-RC2:1.9
	netbsd-10-0-RC1:1.9
	netbsd-10:1.9.0.2
	netbsd-10-base:1.9
	netbsd-9-3-RELEASE:1.7
	cjep_sun2x-base1:1.7
	cjep_sun2x:1.7.0.70
	cjep_sun2x-base:1.7
	cjep_staticlib_x-base1:1.7
	netbsd-9-2-RELEASE:1.7
	cjep_staticlib_x:1.7.0.68
	cjep_staticlib_x-base:1.7
	netbsd-9-1-RELEASE:1.7
	phil-wifi-20200421:1.7
	phil-wifi-20200411:1.7
	is-mlppp:1.7.0.66
	is-mlppp-base:1.7
	phil-wifi-20200406:1.7
	netbsd-8-2-RELEASE:1.7
	netbsd-9-0-RELEASE:1.7
	netbsd-9-0-RC2:1.7
	netbsd-9-0-RC1:1.7
	phil-wifi-20191119:1.7
	netbsd-9:1.7.0.64
	netbsd-9-base:1.7
	phil-wifi-20190609:1.7
	netbsd-8-1-RELEASE:1.7
	netbsd-8-1-RC1:1.7
	pgoyette-compat-merge-20190127:1.7
	pgoyette-compat-20190127:1.7
	pgoyette-compat-20190118:1.7
	pgoyette-compat-1226:1.7
	pgoyette-compat-1126:1.7
	pgoyette-compat-1020:1.7
	pgoyette-compat-0930:1.7
	pgoyette-compat-0906:1.7
	netbsd-7-2-RELEASE:1.7
	pgoyette-compat-0728:1.7
	netbsd-8-0-RELEASE:1.7
	phil-wifi:1.7.0.62
	phil-wifi-base:1.7
	pgoyette-compat-0625:1.7
	netbsd-8-0-RC2:1.7
	pgoyette-compat-0521:1.7
	pgoyette-compat-0502:1.7
	pgoyette-compat-0422:1.7
	netbsd-8-0-RC1:1.7
	pgoyette-compat-0415:1.7
	pgoyette-compat-0407:1.7
	pgoyette-compat-0330:1.7
	pgoyette-compat-0322:1.7
	pgoyette-compat-0315:1.7
	netbsd-7-1-2-RELEASE:1.7
	pgoyette-compat:1.7.0.60
	pgoyette-compat-base:1.7
	netbsd-7-1-1-RELEASE:1.7
	matt-nb8-mediatek:1.7.0.58
	matt-nb8-mediatek-base:1.7
	perseant-stdc-iso10646:1.7.0.56
	perseant-stdc-iso10646-base:1.7
	netbsd-8:1.7.0.54
	netbsd-8-base:1.7
	prg-localcount2-base3:1.7
	prg-localcount2-base2:1.7
	prg-localcount2-base1:1.7
	prg-localcount2:1.7.0.52
	prg-localcount2-base:1.7
	pgoyette-localcount-20170426:1.7
	bouyer-socketcan-base1:1.7
	pgoyette-localcount-20170320:1.7
	netbsd-7-1:1.7.0.50
	netbsd-7-1-RELEASE:1.7
	netbsd-7-1-RC2:1.7
	netbsd-7-nhusb-base-20170116:1.7
	bouyer-socketcan:1.7.0.48
	bouyer-socketcan-base:1.7
	pgoyette-localcount-20170107:1.7
	netbsd-7-1-RC1:1.7
	pgoyette-localcount-20161104:1.7
	netbsd-7-0-2-RELEASE:1.7
	localcount-20160914:1.7
	netbsd-7-nhusb:1.7.0.46
	netbsd-7-nhusb-base:1.7
	pgoyette-localcount-20160806:1.7
	pgoyette-localcount-20160726:1.7
	pgoyette-localcount:1.7.0.44
	pgoyette-localcount-base:1.7
	netbsd-7-0-1-RELEASE:1.7
	netbsd-7-0:1.7.0.42
	netbsd-7-0-RELEASE:1.7
	netbsd-7-0-RC3:1.7
	netbsd-7-0-RC2:1.7
	netbsd-7-0-RC1:1.7
	netbsd-5-2-3-RELEASE:1.7
	netbsd-5-1-5-RELEASE:1.7
	netbsd-6-0-6-RELEASE:1.7
	netbsd-6-1-5-RELEASE:1.7
	netbsd-7:1.7.0.40
	netbsd-7-base:1.7
	yamt-pagecache-base9:1.7
	yamt-pagecache-tag8:1.7
	netbsd-6-1-4-RELEASE:1.7
	netbsd-6-0-5-RELEASE:1.7
	tls-earlyentropy:1.7.0.38
	tls-earlyentropy-base:1.7
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.7
	riastradh-drm2-base3:1.7
	netbsd-6-1-3-RELEASE:1.7
	netbsd-6-0-4-RELEASE:1.7
	netbsd-5-2-2-RELEASE:1.7
	netbsd-5-1-4-RELEASE:1.7
	netbsd-6-1-2-RELEASE:1.7
	netbsd-6-0-3-RELEASE:1.7
	netbsd-5-2-1-RELEASE:1.7
	netbsd-5-1-3-RELEASE:1.7
	netbsd-6-1-1-RELEASE:1.7
	riastradh-drm2-base2:1.7
	riastradh-drm2-base1:1.7
	riastradh-drm2:1.7.0.32
	riastradh-drm2-base:1.7
	netbsd-6-1:1.7.0.36
	netbsd-6-0-2-RELEASE:1.7
	netbsd-6-1-RELEASE:1.7
	netbsd-6-1-RC4:1.7
	netbsd-6-1-RC3:1.7
	agc-symver:1.7.0.34
	agc-symver-base:1.7
	netbsd-6-1-RC2:1.7
	netbsd-6-1-RC1:1.7
	yamt-pagecache-base8:1.7
	netbsd-5-2:1.7.0.30
	netbsd-6-0-1-RELEASE:1.7
	yamt-pagecache-base7:1.7
	netbsd-5-2-RELEASE:1.7
	netbsd-5-2-RC1:1.7
	matt-nb6-plus-nbase:1.7
	yamt-pagecache-base6:1.7
	netbsd-6-0:1.7.0.28
	netbsd-6-0-RELEASE:1.7
	netbsd-6-0-RC2:1.7
	tls-maxphys:1.7.0.26
	tls-maxphys-base:1.7
	matt-nb6-plus:1.7.0.24
	matt-nb6-plus-base:1.7
	netbsd-6-0-RC1:1.7
	yamt-pagecache-base5:1.7
	yamt-pagecache-base4:1.7
	netbsd-6:1.7.0.22
	netbsd-6-base:1.7
	netbsd-5-1-2-RELEASE:1.7
	netbsd-5-1-1-RELEASE:1.7
	yamt-pagecache-base3:1.7
	yamt-pagecache-base2:1.7
	yamt-pagecache:1.7.0.4
	yamt-pagecache-base:1.7
	cherry-xenmp:1.7.0.20
	cherry-xenmp-base:1.7
	bouyer-quota2-nbase:1.7
	bouyer-quota2:1.7.0.18
	bouyer-quota2-base:1.7
	matt-mips64-premerge-20101231:1.7
	matt-nb5-mips64-premerge-20101231:1.7
	matt-nb5-pq3:1.7.0.16
	matt-nb5-pq3-base:1.7
	netbsd-5-1:1.7.0.14
	netbsd-5-1-RELEASE:1.7
	netbsd-5-1-RC4:1.7
	matt-nb5-mips64-k15:1.7
	netbsd-5-1-RC3:1.7
	netbsd-5-1-RC2:1.7
	netbsd-5-1-RC1:1.7
	netbsd-5-0-2-RELEASE:1.7
	matt-nb5-mips64-premerge-20091211:1.7
	matt-premerge-20091211:1.7
	matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.7
	matt-nb4-mips64-k7-u2a-k9b:1.7
	matt-nb5-mips64-u1-k1-k5:1.7
	matt-nb5-mips64:1.7.0.12
	netbsd-5-0-1-RELEASE:1.7
	jym-xensuspend-nbase:1.7
	netbsd-5-0:1.7.0.10
	netbsd-5-0-RELEASE:1.7
	netbsd-5-0-RC4:1.7
	netbsd-5-0-RC3:1.7
	netbsd-5-0-RC2:1.7
	jym-xensuspend:1.7.0.8
	jym-xensuspend-base:1.7
	netbsd-5-0-RC1:1.7
	netbsd-5:1.7.0.6
	netbsd-5-base:1.7
	matt-mips64-base2:1.7
	matt-mips64:1.6.0.34
	netbsd-4-0-1-RELEASE:1.6
	wrstuden-revivesa-base-3:1.7
	wrstuden-revivesa-base-2:1.7
	wrstuden-fixsa-newbase:1.6
	wrstuden-revivesa-base-1:1.7
	yamt-pf42-base4:1.7
	yamt-pf42-base3:1.7
	hpcarm-cleanup-nbase:1.7
	yamt-pf42-baseX:1.6
	yamt-pf42-base2:1.7
	wrstuden-revivesa:1.7.0.2
	wrstuden-revivesa-base:1.7
	yamt-pf42:1.6.0.32
	yamt-pf42-base:1.6
	keiichi-mipv6:1.6.0.30
	keiichi-mipv6-base:1.6
	matt-armv6-nbase:1.6
	matt-armv6-prevmlocking:1.6
	wrstuden-fixsa-base-1:1.6
	netbsd-4-0:1.6.0.28
	netbsd-4-0-RELEASE:1.6
	cube-autoconf:1.6.0.26
	cube-autoconf-base:1.6
	netbsd-4-0-RC5:1.6
	netbsd-4-0-RC4:1.6
	netbsd-4-0-RC3:1.6
	netbsd-4-0-RC2:1.6
	netbsd-4-0-RC1:1.6
	matt-armv6:1.6.0.24
	matt-armv6-base:1.6
	matt-mips64-base:1.6
	hpcarm-cleanup:1.6.0.22
	hpcarm-cleanup-base:1.6
	netbsd-3-1-1-RELEASE:1.6
	netbsd-3-0-3-RELEASE:1.6
	wrstuden-fixsa:1.6.0.20
	wrstuden-fixsa-base:1.6
	abandoned-netbsd-4-base:1.6
	abandoned-netbsd-4:1.6.0.14
	netbsd-3-1:1.6.0.16
	netbsd-3-1-RELEASE:1.6
	netbsd-3-0-2-RELEASE:1.6
	netbsd-3-1-RC4:1.6
	netbsd-3-1-RC3:1.6
	netbsd-3-1-RC2:1.6
	netbsd-3-1-RC1:1.6
	netbsd-4:1.6.0.18
	netbsd-4-base:1.6
	netbsd-3-0-1-RELEASE:1.6
	netbsd-3-0:1.6.0.12
	netbsd-3-0-RELEASE:1.6
	netbsd-3-0-RC6:1.6
	netbsd-3-0-RC5:1.6
	netbsd-3-0-RC4:1.6
	netbsd-3-0-RC3:1.6
	netbsd-3-0-RC2:1.6
	netbsd-3-0-RC1:1.6
	netbsd-2-0-3-RELEASE:1.6
	netbsd-2-1:1.6.0.10
	netbsd-2-1-RELEASE:1.6
	netbsd-2-1-RC6:1.6
	netbsd-2-1-RC5:1.6
	netbsd-2-1-RC4:1.6
	netbsd-2-1-RC3:1.6
	netbsd-2-1-RC2:1.6
	netbsd-2-1-RC1:1.6
	netbsd-2-0-2-RELEASE:1.6
	netbsd-3:1.6.0.8
	netbsd-3-base:1.6
	netbsd-2-0-1-RELEASE:1.6
	netbsd-2:1.6.0.6
	netbsd-2-base:1.6
	netbsd-2-0-RELEASE:1.6
	netbsd-2-0-RC5:1.6
	netbsd-2-0-RC4:1.6
	netbsd-2-0-RC3:1.6
	netbsd-2-0-RC2:1.6
	netbsd-2-0-RC1:1.6
	netbsd-2-0:1.6.0.4
	netbsd-2-0-base:1.6
	netbsd-1-6-PATCH002-RELEASE:1.6
	netbsd-1-6-PATCH002:1.6
	netbsd-1-6-PATCH002-RC4:1.6
	netbsd-1-6-PATCH002-RC3:1.6
	netbsd-1-6-PATCH002-RC2:1.6
	netbsd-1-6-PATCH002-RC1:1.6
	netbsd-1-6-PATCH001:1.6
	netbsd-1-6-PATCH001-RELEASE:1.6
	netbsd-1-6-PATCH001-RC3:1.6
	netbsd-1-6-PATCH001-RC2:1.6
	netbsd-1-6-PATCH001-RC1:1.6
	fvdl_fs64_base:1.6
	netbsd-1-6-RELEASE:1.6
	netbsd-1-6-RC3:1.6
	netbsd-1-6-RC2:1.6
	netbsd-1-6-RC1:1.6
	netbsd-1-6:1.6.0.2
	netbsd-1-6-base:1.6
	netbsd-1-5-PATCH003:1.4.8.1
	netbsd-1-5-PATCH002:1.4.8.1
	netbsd-1-5-PATCH001:1.4.8.1
	netbsd-1-5-RELEASE:1.4.8.1
	netbsd-1-5-BETA2:1.4.8.1
	netbsd-1-5-BETA:1.4.8.1
	netbsd-1-4-PATCH003:1.3.2.1
	netbsd-1-5-ALPHA2:1.4.8.1
	netbsd-1-5:1.4.0.8
	netbsd-1-5-base:1.4
	minoura-xpg4dl:1.4.0.6
	minoura-xpg4dl-base:1.4
	netbsd-1-4-PATCH002:1.3
	wrstuden-devbsize-19991221:1.4
	wrstuden-devbsize:1.4.0.4
	wrstuden-devbsize-base:1.4
	comdex-fall-1999:1.4.0.2
	comdex-fall-1999-base:1.4
	netbsd-1-4-PATCH001:1.3
	netbsd-1-4-RELEASE:1.3
	netbsd-1-4:1.3.0.2
	netbsd-1-4-base:1.3;
locks; strict;
comment	@# @;


1.9
date	2021.12.05.08.09.30;	author msaitoh;	state Exp;
branches;
next	1.8;
commitid	PKFxyFmb1QWr4rjD;

1.8
date	2021.12.03.13.27.37;	author andvar;	state Exp;
branches;
next	1.7;
commitid	DquzAR6z9AlkTcjD;

1.7
date	2008.04.30.13.10.50;	author martin;	state Exp;
branches;
next	1.6;

1.6
date	2000.08.09.23.41.27;	author gmcgarry;	state Exp;
branches
	1.6.32.1;
next	1.5;

1.5
date	2000.07.22.16.04.57;	author erh;	state Exp;
branches;
next	1.4;

1.4
date	99.07.02.15.12.15;	author simonb;	state Exp;
branches
	1.4.8.1;
next	1.3;

1.3
date	99.01.27.05.50.29;	author erh;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	98.11.12.05.39.45;	author erh;	state Exp;
branches;
next	1.1;

1.1
date	98.11.07.09.36.54;	author erh;	state Exp;
branches;
next	;

1.6.32.1
date	2008.05.18.12.30.09;	author yamt;	state Exp;
branches;
next	;

1.4.8.1
date	2000.08.11.03.24.23;	author gmcgarry;	state Exp;
branches;
next	;

1.3.2.1
date	2000.08.14.14.07.56;	author he;	state Exp;
branches;
next	;


desc
@@


1.9
log
@s/supress/suppress/
@
text
@#!/bin/ksh
#	$NetBSD: checkvers,v 1.8 2021/12/03 13:27:37 andvar Exp $
#
# Copyright (c) 1998 The NetBSD Foundation, Inc.
# All rights reserved.
#
# This code is derived from software contributed to The NetBSD Foundation
# by Eric Haszlakiewicz.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#

#--------------------------------------------------------------------#
# checkvers [-q] [systemlibdir [library name]]
#
# This is a wrapper script around checkver.  It will find
# all directories within the current directory containing
# a shlib_version file and call checkver for each.
#
# As with checkver, a list of directories of installed libraries
# may be specified.  This will replace the default of "/usr/lib"
# and search there instead.
#
# A library name may also be specified.  However, this script
# will not work correctly if it finds shlib_version files
# corresponding to a different library.
#
# This script produces no output if all library versions are ok.
# If the versions aren't ok the header will be displayed once
# followed by a list of problematic libraries.
#

# checkvers:
#	if "-s", build list, pass with -f to checkver.
#	if "-d", build list, pass with -f to checkver.
#	if "-f", pass with -f to checkver.


# Cleanup on exit.
TMP=/tmp/checkvers.$$
trap "exit 2" 1 2 3 4 5 6 7 8 10 11 12 13 14 15
trap "rm -rf $TMP" 0

Usage ( ) {
    echo "Usage: $1 [-q] -d [installedlibdir [library name]]"
    echo "       $1 [-q] -s [setlistdir [library name]]"
    echo "       $1 [-q] -f liblistfile [library name]"
}

basedir=/usr/src
setsdir=$basedir/distrib/sets/lists
libdir=/usr/lib

error=0
quiet=0
usedir=0
usefile=0
usesets=0
CWD=`pwd`
args=`getopt "df:shq" "$@@"`
if [ $? -ne 0 ] ; then
    Usage $0
    exit 0
fi

set -- $args

while . ; do
    case "$1" in
	-d) usedir=1 ; shift
	    if [ $usefile -eq 1 -o $usesets -eq 1 ]; then
		Usage $0 ; exit 2
	    fi;;
	-f) usefile=1 ; arg1=$2 ; shift ; shift
	    if [ $usedir -eq 1 -o $usesets -eq 1 ]; then
		Usage $0 ; exit 2
	    fi;;
	-s) usesets=1 ; shift
	    if [ $usedir -eq 1 -o $usefile -eq 1 ]; then
		Usage $0 ; exit 2
	    fi;;
	-h) Usage $0 ; exit 0;;
	-q) quiet=1 ; shift;;
	--) shift ; break;;
    esac
done

if [ $usedir -eq 0 -a $usefile -eq 0 -a $usesets -eq 0 ] ; then
    Usage $0 ; exit 2
fi
if [ $usefile -eq 0 -a $# -gt 2 ] ; then
    Usage $0 ; exit 2
fi
if [ $usefile -eq 1 -a $# -gt 1 ] ; then
    Usage $0 ; exit 2
fi

#-------------------------#

QUIET=
LIBNAME=

# Suppress header.
if [ quiet -eq 1 ] ; then
    QUIET="-q"
fi

if ! mkdir -m 700 $TMP ; then
    echo "$0: Unable to create temp directory."
    exit 2
fi

if [ $usefile -eq 1 ] ; then
    # Just pass the file name to checkver.
    LIBLIST="$arg1"
else
    LIBLIST=$TMP/libs.lst
fi

# Build list from the installed libraries.
if [ $usedir -eq 1 ] ; then
    if [ "X$1" != "X" ] ; then
	libdir="$1"
    fi
    for f in $libdir ; do
	ls $f/lib*.so.*.*
    done > $LIBLIST 2> /dev/null
fi

# Build list from set lists.  Parameter may be either
# the "lists" directory or the top of the source tree.
if [ $usesets -eq 1 ] ; then
    if [ "X$1" != "X" ] ; then
	setsdir="$1"
	if [ -d "$setsdir/distrib/sets/lists" ] ; then
	    setsdir="$setsdir/distrib/sets/lists"
	fi
    fi
    (cd $setsdir ;
     cat */[a-z]* | grep '^./usr/lib/lib.*\.so\.[0-9][0-9]*\.[0-9][0-9]*' \
		  | sort -u > $LIBLIST
    )
fi

if [ "X$2" != "X" ] ; then
    LIBNAME="$2"
fi

EXECDIR=`eval "(cd \`dirname $0\` ; pwd)"`

CWD=`pwd`
VERFILES=`find $CWD -name shlib_version -print`

for f in $VERFILES ; do
    # Call checkver.  We always have a list of libraries
    # here, whether given to us or built, so always
    # pass the -f flag.
    (cd `dirname $f` ;
    "sh $EXECDIR"/checkver $QUIET -f "$LIBLIST" "$LIBNAME" ;
    exit $?)
    ERR=$?
    if [ $ERR -eq 2 ] ; then
	echo "$0: checkver failed. LIBLIST=$LIBLIST $LIBNAME=$LIBNAME"
	exit 2
    fi
    if [ $ERR -ne 0 ] ; then
	QUIET="-q"
	error=1
    fi

    if [ "X$LIBNAME" = "X" ] ; then
	# Build the library name from the directory it's in.
	libname=`dirname $f`
	libname=`basename $libname`
	if ! echo $libname | grep -q "^lib" ; then
	    libname="lib$libname"
	fi
    else
	libname="$LIBNAME"
    fi

    if [ -e $TMP/$libname ] ; then
	echo "Warning: $libname sources encountered multiple times."
	echo "         Previous location: `cat $TMP/$libname`"
	echo "         Current location: `dirname $f`"
    fi
    echo "`dirname $f`" > $TMP/$libname

done

exit $error
@


1.8
log
@fix various typos in comments, log messages and documentation.
@
text
@d2 1
a2 1
#	$NetBSD: checkvers,v 1.7 2008/04/30 13:10:50 martin Exp $
d122 1
a122 1
# Supress header.
@


1.7
log
@Convert TNF licenses to new 2 clause variant
@
text
@d2 1
a2 1
#	$NetBSD: checkvers,v 1.6 2000/08/09 23:41:27 gmcgarry Exp $
d36 1
a36 1
# all directories withing the current directory containing
d47 1
a47 1
# This script produces no output if all library version are ok.
@


1.6
log
@Remove executable permission from src/lib/checkver.
@
text
@d2 1
a2 1
#	$NetBSD: checkvers,v 1.5 2000/07/22 16:04:57 erh Exp $
a17 7
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#        This product includes software developed by the NetBSD
#        Foundation, Inc. and its contributors.
# 4. Neither the name of The NetBSD Foundation nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
@


1.6.32.1
log
@sync with head.
@
text
@d2 1
a2 1
#	$NetBSD: checkvers,v 1.6 2000/08/09 23:41:27 gmcgarry Exp $
d18 7
@


1.5
log
@Ignore (to devnull) errors from ls when no libraries are installed.
@
text
@d2 1
a2 1
#	$NetBSD: checkvers,v 1.4 1999/07/02 15:12:15 simonb Exp $
d185 1
a185 1
    "$EXECDIR"/checkver $QUIET -f "$LIBLIST" "$LIBNAME" ;
@


1.4
log
@Remove trailing white space.
@
text
@d2 1
a2 1
#	$NetBSD: checkvers,v 1.3 1999/01/27 05:50:29 erh Exp $
d153 1
a153 1
    done > $LIBLIST
@


1.4.8.1
log
@Pull-up approved by releng-1-5:

 > basesrc/lib/checkvers (revision 1.6)
 > sharesrc/share/mk/bsd.lib.mk (revision 1.176)
 >
 > Remove executable permission from src/lib/checkver.
@
text
@d2 1
a2 1
#	$NetBSD$
d185 1
a185 1
    "sh $EXECDIR"/checkver $QUIET -f "$LIBLIST" "$LIBNAME" ;
@


1.3
log
@Replace find with ls when looking for installed libraries to prevent subdirectories from being searched.  (suggested by Hubert Feyrer)
@
text
@d2 1
a2 1
#	$NetBSD: $
d49 1
a49 1
# 
@


1.3.2.1
log
@Pull up revision 1.5 (requested by he):
  Output ignorable error messages to /dev/null.
@
text
@d2 1
a2 1
#	$NetBSD: checkvers,v 1.3 1999/01/27 05:50:29 erh Exp $
d153 1
a153 1
    done > $LIBLIST 2> /dev/null
@


1.2
log
@Add ability to use either a file or the sets files when checking library version numbers.  Added -d, -s and -f flags for check dir, check sets and check file.  Suggested by Simon Burge.
@
text
@d2 1
d151 3
a153 1
    find $libdir -name 'lib*.so.*.*' > $LIBLIST
@


1.1
log
@Add scripts to find any installed libraries whose version is greater than the source version (major, minor).  "checkver" actually does this check.  "checkvers" find all libraries (actually all shlib_version files) below the current directory and runs the checkver script for each one.
@
text
@d58 5
a62 2
TMP=/tmp/check.$$
error=0
d65 2
a66 1
trap "exit 1" 1 2 3 4 5 6 7 8 10 11 12 13 14 15
d70 3
a72 1
    echo "$1 [-q] [installedlibdir [library name]]"
d75 12
a86 2
if echo "$*" |
   egrep -q '([[:space:]]|^)-h([[:space:]]|$)|([[:space:]]|^)--help*' ; then
d91 39
a129 2
if [ "X$1" = "X-q" ] ; then
    # Supress header.
d131 10
a140 1
    shift
d142 9
a150 1
    QUIET=
d153 13
a165 4
if [ "X$1" != "X" ] ; then
    LIBDIR="$1"
else
    LIBDIR="/usr/lib"
d167 1
a169 7
else
    LIBNAME=
fi

if ! mkdir -m 700 $TMP ; then
    echo "Unable to create temp directory."
    exit 1
d178 3
a180 1

d182 1
a182 1
    "$EXECDIR"/checkver $QUIET "$LIBDIR" "$LIBNAME" ;
d184 6
a189 1
    if [ $? -ne 0 ] ; then
d214 1
a214 1
exit 0
@
