diff options
author | Robert Peichaer <rpe@cvs.openbsd.org> | 2015-07-03 18:29:09 +0000 |
---|---|---|
committer | Robert Peichaer <rpe@cvs.openbsd.org> | 2015-07-03 18:29:09 +0000 |
commit | 30b6f0f78b690cfd42766637c7bd5b93459b011f (patch) | |
tree | 97a18ead01ee319f4f0a45997835938cca4e77ef /distrib | |
parent | e0a0e92260900b23ac45ff0e4a40847ea974ab1e (diff) |
Use [aA]* instead of a*|A* in case-blocks.
OK krw@
@halex agreed on this in a similar diff
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/miniroot/dot.profile | 10 | ||||
-rw-r--r-- | distrib/miniroot/install.sub | 18 |
2 files changed, 14 insertions, 14 deletions
diff --git a/distrib/miniroot/dot.profile b/distrib/miniroot/dot.profile index 66aef1ecb03..8c0ddb1ceac 100644 --- a/distrib/miniroot/dot.profile +++ b/distrib/miniroot/dot.profile @@ -1,4 +1,4 @@ -# $OpenBSD: dot.profile,v 1.28 2015/07/01 21:12:49 rpe Exp $ +# $OpenBSD: dot.profile,v 1.29 2015/07/03 18:29:08 rpe Exp $ # $NetBSD: dot.profile,v 1.1 1995/12/18 22:54:43 pk Exp $ # # Copyright (c) 2009 Kenneth R. Westerback @@ -107,13 +107,13 @@ __EOT fi case $REPLY in - a*|A*) /install -a && break + [aA]*) /install -a && break ;; - i*|I*) /install && break + [iI]*) /install && break ;; - u*|U*) /upgrade && break + [uU]*) /upgrade && break ;; - s*|S*) break + [sS]*) break ;; !) echo "Type 'exit' to return to install." ksh diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index b9de9f7c6fd..395945e28d0 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.843 2015/06/02 19:54:06 rpe Exp $ +# $OpenBSD: install.sub,v 1.844 2015/07/03 18:29:08 rpe Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org> @@ -302,9 +302,9 @@ disklabel_autolayout() { disklabel -h -A $_disk | egrep "^# |^ [a-p]:" ask "Use (A)uto layout, (E)dit auto layout, or create (C)ustom layout?" a case $resp in - a*|A*) _op=-w ;; - e*|E*) _op=-E ;; - c*|C*) return 0 ;; + [aA]*) _op=-w ;; + [eE]*) _op=-E ;; + [cC]*) return 0 ;; *) continue ;; esac disklabel -F $_f $_op -A $_disk @@ -1471,7 +1471,7 @@ set_term() { while :; do ask "Choose your keyboard layout ('?' or 'L' for list)" "default" case $resp in - "?"|L|l) echo "Available layouts: $_layouts";; + [lL\?]) echo "Available layouts: $_layouts";; default) return;; *) kbd $resp && { echo $resp >/tmp/kbdtype; return; };; esac @@ -2032,14 +2032,14 @@ install_sets() { ask "Location of sets? (${_cddevs:+$_cddevs }$_locs or 'done')" "$_d" case $resp in done) sane_install && return;; - c*|C*) if [[ -n $_cddevs ]]; then + [cC]*) if [[ -n $_cddevs ]]; then set -- $_cddevs [[ $resp == @(c|C|cd|CD|Cd|cD) ]] && resp=$1 install_cdrom $resp && METHOD=$resp fi;; - d*|D*) install_disk && METHOD=disk;; - h*|H*) isin http $_locs && install_http && METHOD=http;; - n*|N*) isin nfs $_locs && install_nfs && METHOD=nfs;; + [dD]*) install_disk && METHOD=disk;; + [hH]*) isin http $_locs && install_http && METHOD=http;; + [nN]*) isin nfs $_locs && install_nfs && METHOD=nfs;; *) $AUTO && echo "'$resp' is not a valid choice." && exit 1;; esac |