2019-10-29 13:48:27 +01:00
|
|
|
#!/usr/bin/env bash
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-11-06 11:59:56 +01:00
|
|
|
development=false
|
2019-11-05 20:59:35 +01:00
|
|
|
|
2019-10-28 11:19:48 +01:00
|
|
|
install_packages() {
|
2019-10-30 11:44:46 +01:00
|
|
|
if [[ -f /usr/bin/pacman ]]; then
|
|
|
|
sudo pacman -S clang make cmake fltk catch2
|
|
|
|
|
2019-10-31 11:52:11 +01:00
|
|
|
elif [[ -f /usr/bin/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
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
elif [[ -f /usr/local/Homebrew ]]; then
|
2019-11-05 20:59:35 +01:00
|
|
|
sudo brew install clang make cmake fltk catch2
|
|
|
|
|
|
|
|
#some systems have --with-toolchain some dont, so we need to do this
|
|
|
|
if ! sudo brew install llvm --with-toolchain; then
|
|
|
|
sudo brew install llvm
|
2019-11-06 11:50:25 +01:00
|
|
|
fi
|
2019-11-05 20:59:35 +01:00
|
|
|
|
|
|
|
ln -s "/usr/local/opt/llvm/bin/clang-tidy" "/usr/local/bin/clang-tidy"
|
2019-10-31 11:52:11 +01:00
|
|
|
fi
|
2019-10-10 10:46:11 +02:00
|
|
|
}
|
|
|
|
|
2019-11-05 20:59:35 +01:00
|
|
|
while [ -n "$1" ]; do
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
|
|
|
|
-dev) development = true ;;
|
|
|
|
|
|
|
|
*) echo "Option $1 not recognized" ;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
shift
|
|
|
|
|
|
|
|
done
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-10-28 11:19:48 +01:00
|
|
|
install_packages
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-10-23 13:28:52 +02:00
|
|
|
echo "cloning repositories"
|
|
|
|
cd ..
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-11-05 20:59:35 +01:00
|
|
|
if [ $development ]; then
|
2019-11-06 11:59:56 +01:00
|
|
|
|
2019-11-05 20:59:35 +01:00
|
|
|
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/library.git
|
|
|
|
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/shared-memory.git
|
|
|
|
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/text-renderer.git
|
|
|
|
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/gui.git
|
|
|
|
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/terminal.git
|
|
|
|
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/simple-draw.git
|
|
|
|
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/demo.git
|
2019-11-06 11:59:56 +01:00
|
|
|
|
|
|
|
else
|
|
|
|
|
2019-11-05 20:59:35 +01:00
|
|
|
git clone https://gitlab.repo.digitech.hs-emden-leer.de/link/projekte/ws19/vkvm-new/library.git
|
|
|
|
git clone https://gitlab.repo.digitech.hs-emden-leer.de/link/projekte/ws19/vkvm-new/shared-memory.git
|
|
|
|
git clone https://gitlab.repo.digitech.hs-emden-leer.de/link/projekte/ws19/vkvm-new/text-renderer.git
|
|
|
|
git clone https://gitlab.repo.digitech.hs-emden-leer.de/link/projekte/ws19/vkvm-new/gui.git
|
|
|
|
git clone https://gitlab.repo.digitech.hs-emden-leer.de/link/projekte/ws19/vkvm-new/terminal.git
|
|
|
|
git clone https://gitlab.repo.digitech.hs-emden-leer.de/link/projekte/ws19/vkvm-new/simple-draw.git
|
|
|
|
git clone https://gitlab.repo.digitech.hs-emden-leer.de/link/projekte/ws19/vkvm-new/demo.git
|
2019-11-06 11:59:56 +01:00
|
|
|
|
2019-11-05 20:59:35 +01:00
|
|
|
fi
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-11-05 20:59:35 +01:00
|
|
|
mkdir library/build
|
2019-10-23 13:28:52 +02:00
|
|
|
mkdir shared-memory/build
|
|
|
|
mkdir text-renderer/build
|
|
|
|
mkdir gui/build
|
|
|
|
mkdir terminal/build
|
|
|
|
mkdir simple-draw/build
|
|
|
|
mkdir demo/build
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-11-05 20:59:35 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-10-23 14:19:00 +02:00
|
|
|
cd installation
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-10-23 13:28:52 +02:00
|
|
|
echo "installation completed"
|
2019-10-29 13:48:27 +01:00
|
|
|
./build.sh
|