fixing bash installer

This commit is contained in:
Greg Gauthier 2020-10-10 16:00:11 +01:00
parent 1e263f05ba
commit 7bdb1712b9
2 changed files with 12 additions and 10 deletions

View File

@ -5,13 +5,13 @@ PY=$(which python3)
HC=$(which hoverctl)
echo "PREPARING PYTHON3 ENVIRONMENT..."
if [[ "$PY" = "python3 not found" ]];
if [ "$PY" = "python3 not found" ];
then
echo "No python3 installation found. Attempting install now..."
if [[ "$OS" = "Darwin" ]]; then
if [ "$OS" = "Darwin" ]; then
$(brew install python3)
fi
if [[ "$OS" = "Linux" ]]; then
if [ "$OS" = "Linux" ]; then
$(sudo apt install python3)
fi
PY=$(which python3)
@ -19,13 +19,13 @@ fi
echo "PREPARING HOVERFLY INSTALLATION..."
# shellcheck disable=SC2039
if [[ "$HC" = "hoverctl not found" ]];
if [ "$HC" = "hoverctl not found" ];
then
echo "HoverFly CLI binary not found. Attempting install now..."
if [[ "$OS" = "Darwin" ]]; then
if [ "$OS" = "Darwin" ]; then
$(brew install hoverfly)
fi
if [[ "$OS" = "Linux" ]]; then
if [ "$OS" = "Linux" ]; then
$(wget https://github.com/SpectoLabs/hoverfly/releases/download/v1.0.0/hoverfly_bundle_linux_amd64.zip)
$(unzip hoverfly_bundle_linux_amd64.zip)
$(sudo mv hoverctl /usr/local/bin)
@ -39,7 +39,7 @@ PENV=$(${PY} -m pip freeze|grep -i pipenv)
PYVER=$(${PY} --version)
echo "${PYVER}"
if [[ -z "$PENV" && "$PENV"=" " ]];
if [ -z "$PENV" ] && [ "$PENV"=" " ];
then
echo "Installing pipenv for python3..."
${PY} -m pip install pipenv
@ -51,4 +51,4 @@ fi
echo "Dependency Graph:"
pipenv graph
echo "ALL SYSTEMS GO!"
echo "ALL SYSTEMS GO!"

View File

@ -1,4 +1,6 @@
#!/usr/bin/env sh
pipenv run python3 app/simple.py
pipenv run python3 -m pytest tests/test_hov.py --verbose --show-capture=all
python3 -m pip install pipenv
pipenv run ./install.sh
pipenv run python3 app/simple.py &
pipenv run python3 -m pytest tests/test_hov.py --verbose --show-capture=all