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

View File

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