Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/common Remove test ([) -o usage, and make a couple o...
details: https://anonhg.NetBSD.org/src/rev/249b2c77eb74
branches: trunk
changeset: 433491:249b2c77eb74
user: kre <kre%NetBSD.org@localhost>
date: Sun Sep 16 21:41:34 2018 +0000
description:
Remove test ([) -o usage, and make a couple of minor cleanups as well.
diffstat:
distrib/common/sunbootcd.sh | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diffs (39 lines):
diff -r 277ea7e94284 -r 249b2c77eb74 distrib/common/sunbootcd.sh
--- a/distrib/common/sunbootcd.sh Sun Sep 16 21:32:29 2018 +0000
+++ b/distrib/common/sunbootcd.sh Sun Sep 16 21:41:34 2018 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# $NetBSD: sunbootcd.sh,v 1.6 2012/02/22 16:12:34 martin Exp $
+# $NetBSD: sunbootcd.sh,v 1.7 2018/09/16 21:41:34 kre Exp $
#
# Copyright (c) 2003 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -59,11 +59,13 @@
exit 1
}
-if [ $# -lt 2 -o $# -gt 6 ]; then
- usage
-fi
+case "$#" in
+([23456]) ;;
+(*) usage;;
+esac
-for curfile in $*; do
+for curfile
+do
[ "$curfile" = "-" ] && continue
if [ ! -f "$curfile" ]; then
echo 1>&2 "${PROGNAME}: ${curfile}: No such file."
@@ -81,7 +83,8 @@
ENDCYL=${ISOCYLS}
curpart=0
-for curfile in $*; do
+for curfile
+do
curpart=$(( ${curpart} + 1 ))
[ "$curfile" = "-" ] && continue
Home |
Main Index |
Thread Index |
Old Index