Change non-standard which to command -v
This commit is contained in:
+4
-4
@@ -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
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user