71 lines
2.4 KiB
Bash
Executable File
71 lines
2.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
DEVELOPMENT=false
|
|
|
|
install_packages() {
|
|
if [[ -f /usr/bin/pacman ]]; then
|
|
sudo pacman -S clang make cmake fltk catch2 tmux
|
|
|
|
elif [[ -f /etc/debian_version ]]; then
|
|
sudo apt install clang make cmake clang-tidy libfltk1.3 libfltk1.3-dev tmux
|
|
|
|
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
|
|
sudo brew install clang make cmake fltk catch2 tmux
|
|
|
|
#some systems have --with-toolchain some don't, so we need to do this
|
|
if ! sudo brew install llvm --with-toolchain; then
|
|
sudo brew install llvm
|
|
fi
|
|
|
|
ln -s "/usr/local/opt/llvm/bin/clang-tidy" "/usr/local/bin/clang-tidy"
|
|
fi
|
|
}
|
|
|
|
while getopts u:d:p:f: option
|
|
do
|
|
case "${option}"
|
|
in
|
|
dev) DEVELOPMENT=true;;
|
|
esac
|
|
done
|
|
|
|
install_packages
|
|
|
|
echo "cloning repositories"
|
|
cd ..
|
|
|
|
if [ $development ]; then
|
|
|
|
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
|
|
|
|
else
|
|
|
|
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
|
|
|
|
fi
|
|
|
|
|
|
cd installation
|
|
|
|
echo "installation completed"
|
|
|
|
./build-release.sh
|