aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWynn Wolf Arbor2020-06-04 13:56:22 +0200
committerWynn Wolf Arbor2020-06-04 13:56:22 +0200
commit988bc7061938720152169cadaa6ed2bd9af6270b (patch)
treee2c98e7cc9b6fb78ceeeda25529a522868f4a6e4
parent9599e2b5daad3db0e9e536fef20bb75a7b0ad0b6 (diff)
downloadkern-988bc7061938720152169cadaa6ed2bd9af6270b.tar.gz
Use OR lists instead of if commands
Use a more succinct and clear style in two places by converting if commands into simple OR lists.
Diffstat (limited to '')
-rwxr-xr-xkern8
1 files changed, 2 insertions, 6 deletions
diff --git a/kern b/kern
index c6b2a57..d95ab9b 100755
--- a/kern
+++ b/kern
@@ -35,9 +35,7 @@ set_kernel() {
current=$(get_current_kernel)
kerndir=$SRCDIR/$kern
- if test ! -d "$kerndir"; then
- errx "No such file or directory: $kerndir"
- fi
+ test -d "$kerndir" || errx "No such file or directory: $kerndir"
if test "$kern" = "$current"; then
err "Warning: Latest kernel already selected: $kern"
@@ -53,9 +51,7 @@ set_kernel() {
config_kernel() {
host=${1:-$(hostname)}
- if test ! -d "$KERNFRAG"; then
- errx "No such file or directory: $KERNFRAG"
- fi
+ test -d "$KERNFRAG" || errx "No such file or directory: $KERNFRAG"
printf "Starting merge for %s...\n\n" "$host"