Make this work on a real bourne shell.
This commit is contained in:
parent
d4639c815b
commit
8e3f60f367
16
lib/checkver
16
lib/checkver
@ -1,5 +1,5 @@
|
|||||||
#!/bin/ksh
|
#!/bin/sh
|
||||||
# $NetBSD: checkver,v 1.4 1999/01/27 05:50:29 erh Exp $
|
# $NetBSD: checkver,v 1.5 1999/03/16 18:57:31 christos Exp $
|
||||||
#
|
#
|
||||||
# Copyright (c) 1998 The NetBSD Foundation, Inc.
|
# Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
@ -70,10 +70,12 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
TMP=/tmp/checkver.$$
|
TMP=/tmp/checkver.$$
|
||||||
trap "exit 2" 1 2 3 4 5 6 7 8 10 11 12 13 14 15
|
# Can't trap 11 (SEGV) in the Real Bourne Shell, since it uses it for
|
||||||
|
# internal malloc!
|
||||||
|
trap "exit 2" 1 2 3 4 5 6 7 8 10 12 13 14 15
|
||||||
trap "[ -d $TMP ] && rm -rf $TMP" 0
|
trap "[ -d $TMP ] && rm -rf $TMP" 0
|
||||||
|
|
||||||
Usage ( ) {
|
Usage() {
|
||||||
echo "Usage: $1 [-q] -d [installedlibdir [library name]]"
|
echo "Usage: $1 [-q] -d [installedlibdir [library name]]"
|
||||||
echo " $1 [-q] -s [setlistdir [library name]]"
|
echo " $1 [-q] -s [setlistdir [library name]]"
|
||||||
echo " $1 [-q] -f liblistfile [library name]"
|
echo " $1 [-q] -f liblistfile [library name]"
|
||||||
@ -124,7 +126,8 @@ fi
|
|||||||
if [ $usefile -eq 1 ] ; then
|
if [ $usefile -eq 1 ] ; then
|
||||||
LIBLIST="$arg1"
|
LIBLIST="$arg1"
|
||||||
else
|
else
|
||||||
if ! mkdir -m 0700 $TMP ; then
|
mkdir -m 0700 $TMP
|
||||||
|
if [ $? != 0 ]; then
|
||||||
echo "$0: Unable to create temp directory."
|
echo "$0: Unable to create temp directory."
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
@ -171,7 +174,8 @@ if [ "X$2" = "X" ] ; then
|
|||||||
else
|
else
|
||||||
libname="$2"
|
libname="$2"
|
||||||
fi
|
fi
|
||||||
if ! echo $libname | grep -q "^lib" ; then
|
echo $libname | grep "^lib" 1>&2 2> /dev/null
|
||||||
|
if [ $? != 0 ]; then
|
||||||
libname="lib$libname"
|
libname="lib$libname"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user