diff --git a/localbuild.sh b/localbuild.sh index 4ff3a10f..26cc4d6c 100755 --- a/localbuild.sh +++ b/localbuild.sh @@ -39,7 +39,7 @@ function create() { sudo apt install -y locales busybox dialog gettext sed gawk jq curl sudo apt install -y python-is-python3 python3-pip libelf-dev qemu-utils dosfstools cpio xz-utils lz4 lzma bzip2 gzip zstd # sudo snap install yq - if ! type yq &>/dev/null || ! yq --version 2>/dev/null | grep -q "v4."; then + if ! type yq >/dev/null 2>&1 || ! yq --version 2>/dev/null | grep -q "v4."; then sudo curl -kL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq && sudo chmod a+x /usr/bin/yq fi diff --git a/scripts/func.sh b/scripts/func.sh index 89cac4c4..205628c1 100755 --- a/scripts/func.sh +++ b/scripts/func.sh @@ -329,7 +329,7 @@ function createvmx() { local BLIMAGE=${1} local VMNAME=${2} - if ! type qemu-img &>/dev/null; then + if ! type qemu-img >/dev/null 2>&1; then sudo apt install -y qemu-utils fi diff --git a/sourcebuild.sh b/sourcebuild.sh index be94e8f6..877a90b7 100755 --- a/sourcebuild.sh +++ b/sourcebuild.sh @@ -9,7 +9,7 @@ # sudo apt install -y locales busybox dialog gettext sed gawk jq curl # sudo apt install -y python-is-python3 python3-pip libelf-dev qemu-utils dosfstools cpio xz-utils lz4 lzma bzip2 gzip zstd # # sudo snap install yq -# if ! type yq &>/dev/null || ! yq --version 2>/dev/null | grep -q "v4."; then +# if ! type yq >/dev/null 2>&1 || ! yq --version 2>/dev/null | grep -q "v4."; then # sudo curl -kL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/bin/yq && sudo chmod a+x /usr/bin/yq # fi #