From 678724a2b65d96f607de1a546fd31eb877f8e499 Mon Sep 17 00:00:00 2001 From: illiliti Date: Wed, 12 Feb 2020 04:44:41 +0300 Subject: [PATCH] correct if statements --- generate | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/generate b/generate index 0fecaca..ddc97ea 100755 --- a/generate +++ b/generate @@ -57,7 +57,7 @@ check_requirements() { msg info "checking requirements" # check busybox installed - command -v busybox > /dev/null 2>&1 && { + if command -v busybox > /dev/null 2>&1; then # check busybox supports CONFIG_FEATURE_INSTALLER busybox --help | grep -q "\-\-install \[\-s\]" || msg panic "recompile busybox with CONFIG_FEATURE_INSTALLER" @@ -65,13 +65,17 @@ check_requirements() { for busybox_dep in mdev uevent switch_root; do busybox $busybox_dep --help > /dev/null 2>&1 || msg panic "recompile busybox with $busybox_dep" done - } || msg panic "busybox doesn't installed" + else + msg panic "busybox doesn't installed" + fi # check kmod modprobe installed - command -v modprobe > /dev/null 2>&1 && { + if command -v modprobe > /dev/null 2>&1; then # busybox modprobe doesn't supported(yet) modprobe --version 2>&1 | grep -q "kmod" || msg panic "kmod modprobe version doesn't installed" - } || msg panic "modprobe doesn't installed" + else + msg panic "modprobe doesn't installed" + fi # check util-linux tools [ "$use_util_linux" = 1 ] && {