diff options
author | Wynn Wolf Arbor | 2020-06-04 13:56:22 +0200 |
---|---|---|
committer | Wynn Wolf Arbor | 2020-06-04 13:56:22 +0200 |
commit | 988bc7061938720152169cadaa6ed2bd9af6270b (patch) | |
tree | e2c98e7cc9b6fb78ceeeda25529a522868f4a6e4 | |
parent | 9599e2b5daad3db0e9e536fef20bb75a7b0ad0b6 (diff) | |
download | kern-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-x | kern | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -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" |