mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 03:41:53 +02:00
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
This commit is contained in:
@@ -44,7 +44,7 @@ apt-get install -y --no-install-recommends \
|
|||||||
libffi-dev \
|
libffi-dev \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
|
|
||||||
if ! which virtualenv > /dev/null ; then
|
if ! command -v virtualenv > /dev/null ; then
|
||||||
echo Failed to install a working \"virtualenv\" command, exiting
|
echo Failed to install a working \"virtualenv\" command, exiting
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
+3
-3
@@ -83,11 +83,11 @@ ExperimentalBootstrap() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DeterminePythonVersion() {
|
DeterminePythonVersion() {
|
||||||
if which python2 > /dev/null ; then
|
if command -v python2 > /dev/null ; then
|
||||||
export LE_PYTHON=${LE_PYTHON:-python2}
|
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}
|
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}
|
export LE_PYTHON=${LE_PYTHON:-python}
|
||||||
else
|
else
|
||||||
echo "Cannot find any Pythons... please install one!"
|
echo "Cannot find any Pythons... please install one!"
|
||||||
|
|||||||
Reference in New Issue
Block a user