From 1f34697f5690e7a0ceed23e415da3bb34f2feacf Mon Sep 17 00:00:00 2001 From: bin456789 Date: Thu, 28 Sep 2023 23:51:28 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=B8=8D=E6=98=BE=E7=A4=BA=20which=20s?= =?UTF-8?q?tderr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reinstall.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reinstall.sh b/reinstall.sh index eabeb84..d05f624 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -577,10 +577,10 @@ install_pkg() { for cmd in "$@"; do # 用 which 而不是 command -v,因为 command -v 把脚本中的function也算在内 - if ! which $cmd >/dev/null || + if ! which $cmd >/dev/null 2>&1 || # gentoo 默认编译的 unsquashfs 不支持 xz { [ "$cmd" = unsquashfs ] && - which emerge >/dev/null && + which emerge >/dev/null 2>&1 && ! unsquashfs |& grep -w xz && echo "unsquashfs not supported xz. need rebuild."; }; then