Change non-standard which to command -v

This commit is contained in:
Koen Vervloesem
2019-12-09 21:53:25 +01:00
parent d08b62148d
commit 59ba6e5dda
3 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -113,11 +113,11 @@ fi
if [[ -z "${FLAGS_python}" ]]; then
# Auto-detect Python
if [[ ! -z "$(which python3.8)" ]]; then
if [[ ! -z "$(command -v python3.8)" ]]; then
PYTHON='python3.8'
elif [[ ! -z "$(which python3.7)" ]]; then
elif [[ ! -z "$(command -v python3.7)" ]]; then
PYTHON='python3.7'
elif [[ ! -z "$(which python3.6)" ]]; then
elif [[ ! -z "$(command -v python3.6)" ]]; then
PYTHON='python3.6'
else
echo "Installing Python 3.6 from source. This is going to take a LONG time."
@@ -273,7 +273,7 @@ esac
# Mycroft Precise
# -----------------------------------------------------------------------------
if [[ -z "${no_precise}" && -z "$(which precise-engine)" ]]; then
if [[ -z "${no_precise}" && -z "$(command -v precise-engine)" ]]; then
case "${CPU_ARCH}" in
x86_64|armv7l)
echo "Installing Mycroft Precise"
+1 -1
View File
@@ -46,7 +46,7 @@ fi
cd "${this_dir}"
source "${venv}/bin/activate"
if [[ -z "$(which pyinstaller)" ]]; then
if [[ -z "$(command -v pyinstaller)" ]]; then
echo "Missing PyInstaller"
exit 1
fi
+1 -1
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e
if [[ -z "$(which phonetisaurus-train)" ]]; then
if [[ -z "$(command -v phonetisaurus-train)" ]]; then
echo "Phonetisaurus not installed!"
exit 1
fi