Module Name: src
Committed By: kre
Date: Sun Sep 16 21:41:34 UTC 2018
Modified Files:
src/distrib/common: sunbootcd.sh
Log Message:
Remove test ([) -o usage, and make a couple of minor cleanups as well.
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/distrib/common/sunbootcd.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/common/sunbootcd.sh
diff -u src/distrib/common/sunbootcd.sh:1.6 src/distrib/common/sunbootcd.sh:1.7
--- src/distrib/common/sunbootcd.sh:1.6 Wed Feb 22 16:12:34 2012
+++ src/distrib/common/sunbootcd.sh Sun Sep 16 21:41:34 2018
@@ -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 @@ _USAGE_
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 @@ printf "${FORMAT}" "fsimage:" 0 ${ISOCYL
ENDCYL=${ISOCYLS}
curpart=0
-for curfile in $*; do
+for curfile
+do
curpart=$(( ${curpart} + 1 ))
[ "$curfile" = "-" ] && continue