summaryrefslogtreecommitdiff
path: root/distrib/miniroot/install.sub
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2002-04-29 01:38:07 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2002-04-29 01:38:07 +0000
commit6df411d34b508fd22666e694065093fca6693b64 (patch)
treed679f733975428a5f2ac44483c39eeaa33ec0a1a /distrib/miniroot/install.sub
parent41f629f6c097e2eba9dd560f31eee480f2424323 (diff)
Eliminate basename(). Just use parameter expansion syntax to remove
everything up to and including the last '/'. Also removes a now unnecessary variable from install_tape(). Which brings up the question 'Does anyone use tape installs?'.
Diffstat (limited to 'distrib/miniroot/install.sub')
-rw-r--r--distrib/miniroot/install.sub20
1 files changed, 3 insertions, 17 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 5db297596c2..eba795b8b14 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: install.sub,v 1.213 2002/04/29 00:59:35 krw Exp $
+# $OpenBSD: install.sub,v 1.214 2002/04/29 01:38:06 krw Exp $
# $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $
#
# Copyright (c) 1997-2002 Todd Miller, Theo de Raadt, Ken Westerback
@@ -188,18 +188,6 @@ cutlast () {
eval echo \$\{$#\}
}
-basename () {
- local _oifs
-
- [ "$1" ] || return
- _oifs=$IFS
- IFS=/
- set -- $1
- IFS=$_oifs
- while [ "$#" -gt 10 ]; do shift 10; done
- eval echo \$$#
-}
-
isnumeric() {
local _a=$1
@@ -1539,13 +1527,11 @@ The installation program needs to know which tape device to use. Make
sure you use a "no rewind on close" device.
__EOT
- _tape=`basename $TAPE`
resp=
while [ -z "$resp" ]; do
- ask "Name of tape device?" "$_tape"
+ ask "Name of tape device?" "${TAPE##*/}"
done
- _tape=`basename $resp`
- TAPE=/dev/${_tape}
+ TAPE=/dev/${resp##*/}
if [ ! -c $TAPE ]; then
echo "$TAPE does not exist or is not a character special file."
echo "Aborting."