Source

PyHO / scripts / install_and_run_PyHO.sh

Full commit
#!/bin/bash

INSTANCES=${INSTANCES:-4}  # How many instances to run.
BRANCH=${BRANCH:-bootstrapping-ubuntu}

clear
echo "
###################
#       PyHO      #
###################"

echo -e "\nThis script will:
    1. Download latest PyHO version.
    2. Install all requirements (for Ubuntu 12.04).
    3. Install PyHO project in user mode.
    4. Run ${INSTANCES} instances of example FMDT evaluator."

COUNT=10
echo -e "\nRunning installation in ${COUNT} seconds. Press Ctrl+C to stop."

while [[ $COUNT > 0 ]]; do
    echo -n "${COUNT} "
    sleep 1
    let COUNT=COUNT-1
done
echo -e "\n"


echo -e "Downloading sources...\n"
URL="https://bitbucket.org/odiroot/pyho/get/${BRANCH}.zip"
ZIP_OUTPUT="pyho.zip"
wget "${URL}" -O "${ZIP_OUTPUT}"

echo -e "Unpacking sources...\n"
TARGET="PyHO-installation"
unzip -q -o "${ZIP_OUTPUT}" -d "${TARGET}"

# Navigate to ZIP's top-level dir.
cd "${TARGET}"/odiroot-pyho-*

# Install requirements and PyHO
./scripts/ubuntu_dependencies.sh

# Run evaluator instances.
./scripts/run_instances.sh