From 0e602bb504d615459af78a23509c6a5f7379d03e Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 13 Jan 2020 20:11:25 -0700 Subject: [PATCH] Replaced 'which' with 'command -v' * Allows use under new Arch base package --- setup/build_linux | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/build_linux b/setup/build_linux index c94b21a8..392692e3 100755 --- a/setup/build_linux +++ b/setup/build_linux @@ -19,9 +19,9 @@ REPO_DIR="$BUILD_DIR/repo" SKEL_DIR="$LIVE_DIR/airootfs/etc/skel" TEMP_DIR="$BUILD_DIR/temp" MIRRORLIST_SOURCE='https://www.archlinux.org/mirrorlist/?country=US&protocol=http&protocol=https&ip_version=4&use_mirror_status=on' -if which nano >/dev/null 2>&1; then +if command -v nano >/dev/null 2>&1; then EDITOR=nano -elif which vim >/dev/null 2>&1; then +elif command -v vim >/dev/null 2>&1; then EDITOR=vim else EDITOR=vi @@ -130,7 +130,7 @@ function copy_live_env() { function run_elevated() { prog="$1" shift - if which sudo >/dev/null 2>&1; then + if command -v sudo >/dev/null 2>&1; then if ! sudo "$prog" $*; then echo "ERROR: Failed to run '$prog'" if ask "Retry?"; then