#!/usr/bin/env bash install_packages() { declare -A osInfo; osInfo[/usr/bin/pacman]=pacman osInfo[/usr/bin/apt]=apt osInfo[/usr/local/Homebrew]=brew for f in ${!osInfo[@]} do if [[ -f $f ]];then if [[ ${osInfo[$f]} == 'pacman' ]]; then sudo pacman -S clang make cmake fltk catch2 elif [[ ${osInfo[$f]} == 'apt' ]]; then sudo apt install clang make cmake clang-tidy libfltk1.3 libfltk1.3-dev git clone https://github.com/catchorg/Catch2.git cd Catch2 cmake -Bbuild -H. -DBUILD_TESTING=OFF sudo cmake --build build/ --target install elif [[ ${osInfo[$f]} == 'brew' ]]; then sudo brew install llvm clang make cmake clang-format fltk catch2 fi fi done } install_packages echo "cloning repositories" cd .. git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/library.git mkdir library/build git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/shared-memory.git mkdir shared-memory/build git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/text-renderer.git mkdir text-renderer/build git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/gui.git mkdir gui/build git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/terminal.git mkdir terminal/build git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/simple-draw.git mkdir simple-draw/build git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/demo.git mkdir demo/build cd installation echo "installation completed" ./build.sh