From ae4b842c7aa59c55423f4465315cba5a4764c248 Mon Sep 17 00:00:00 2001 From: lemniskett Date: Sun, 10 Jan 2021 13:01:43 +0700 Subject: [PATCH] Use hash for command checking. --- archbox-desktop.bash | 2 +- archbox.bash | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/archbox-desktop.bash b/archbox-desktop.bash index 1bf72aa..8eae06e 100755 --- a/archbox-desktop.bash +++ b/archbox-desktop.bash @@ -14,7 +14,7 @@ install_desktop(){ } checkdep(){ - which $1 >/dev/null 2>&1 || err "Install $1!" + hash $1 2>/dev/null || err "Install $1!" } err(){ diff --git a/archbox.bash b/archbox.bash index 95cd857..c7a1725 100755 --- a/archbox.bash +++ b/archbox.bash @@ -3,7 +3,7 @@ source /etc/archbox.conf checkdep(){ - which $1 >/dev/null 2>&1 || err "Install $1!" + hash $1 2>/dev/null || err "Install $1!" } copyresolv(){