Commits

Michał Odnous committed dab1b06

Initial version of do-it-all script.

  • Participants
  • Parent commits 0b4c865
  • Branches bootstrapping-ubuntu

Comments (0)

Files changed (2)

scripts/install_and_run_PyHO.sh

+#!/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"
+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
+

scripts/ubuntu_dependencies.sh

 echo -e "\nThis script will install all necessary dependencies for
 PyHO project on Ubuntu 12.04.\n\n"
 
-echo -e "Running installation in 5 seconds. Press Ctrl+C to stop.\n"
-
-COUNT=5
-while [[ $COUNT > 0 ]]; do
-    echo $COUNT
-    sleep 1
-    let COUNT=COUNT-1
-done
 
 echo -e "Updating package database...\n"
 sudo apt-get update 1>/dev/null