mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 18:37:44 +02:00
Fix #264 Use pip or pip3 instead only pip3
This commit is contained in:
parent
678f542bdb
commit
cece44f2d1
@ -5,11 +5,20 @@
|
|||||||
echo "Run bash for $1"
|
echo "Run bash for $1"
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
|
||||||
is_defree_installed=$(pip3 list --disable-pip-version-check | grep -E "deftree")
|
# Check if pip3 is installed
|
||||||
|
if command -v pip3 &> /dev/null; then
|
||||||
|
PIP_CMD="pip3"
|
||||||
|
PYTHON_CMD="python3"
|
||||||
|
else
|
||||||
|
PIP_CMD="pip"
|
||||||
|
PYTHON_CMD="python"
|
||||||
|
fi
|
||||||
|
|
||||||
|
is_defree_installed=$($PIP_CMD list --disable-pip-version-check | grep -E "deftree")
|
||||||
if [ -z "$is_defree_installed" ]; then
|
if [ -z "$is_defree_installed" ]; then
|
||||||
echo "The python deftree is not installed. Please install it via"
|
echo "The python deftree is not installed. Please install it via"
|
||||||
echo "pip3 install deftree"
|
echo "$ $PIP_CMD install deftree"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
python3 $1 $2
|
$PYTHON_CMD $1 $2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user