From 3551ffbd648df1d8929e8e5302bee36f08409c90 Mon Sep 17 00:00:00 2001 From: Peter Eckersley Date: Fri, 13 Nov 2015 01:30:34 -0800 Subject: [PATCH] Replace "which" with "command -v" Since the latter is at least semi-POSIX compliant: http://pubs.opengroup.org/onlinepubs/009696899/utilities/command.html Avoids the need for #1486 --- bootstrap/_deb_common.sh | 2 +- letsencrypt-auto | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap/_deb_common.sh b/bootstrap/_deb_common.sh index 71144ce40..4c6b91a33 100755 --- a/bootstrap/_deb_common.sh +++ b/bootstrap/_deb_common.sh @@ -44,7 +44,7 @@ apt-get install -y --no-install-recommends \ libffi-dev \ ca-certificates \ -if ! which virtualenv > /dev/null ; then +if ! command -v virtualenv > /dev/null ; then echo Failed to install a working \"virtualenv\" command, exiting exit 1 fi diff --git a/letsencrypt-auto b/letsencrypt-auto index 25c83cc08..44de7fbf2 100755 --- a/letsencrypt-auto +++ b/letsencrypt-auto @@ -83,11 +83,11 @@ ExperimentalBootstrap() { } DeterminePythonVersion() { - if which python2 > /dev/null ; then + if command -v python2 > /dev/null ; then export LE_PYTHON=${LE_PYTHON:-python2} - elif which python2.7 > /dev/null ; then + elif command -v python2.7 > /dev/null ; then export LE_PYTHON=${LE_PYTHON:-python2.7} - elif which python > /dev/null ; then + elif command -v python > /dev/null ; then export LE_PYTHON=${LE_PYTHON:-python} else echo "Cannot find any Pythons... please install one!"