2019-10-23 13:28:52 +02:00
|
|
|
#!/bin/bash
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-10-23 13:28:52 +02:00
|
|
|
debian=false;
|
|
|
|
arch=false;
|
|
|
|
mac=false;
|
|
|
|
|
|
|
|
# get operating system
|
|
|
|
os_info() {
|
2019-10-10 10:46:11 +02:00
|
|
|
declare -A osInfo;
|
2019-10-23 13:28:52 +02:00
|
|
|
osInfo[/etc/arch-release]=arch
|
|
|
|
osInfo[/etc/debian_version]=debian
|
|
|
|
osInfo[/usr/local/Homebrew]=mac
|
2019-10-10 10:46:11 +02:00
|
|
|
|
|
|
|
for f in ${!osInfo[@]}
|
|
|
|
do
|
|
|
|
if [[ -f $f ]];then
|
2019-10-23 13:28:52 +02:00
|
|
|
if [[ ${osInfo[$f]} == 'arch' ]]; then
|
|
|
|
arch=true;
|
|
|
|
elif [[ ${osInfo[$f]} == 'debian' ]]; then
|
|
|
|
debian=true;
|
|
|
|
elif [[ ${osInfo[$f]} == 'mac' ]]; then
|
|
|
|
mac=true;
|
2019-10-10 10:46:11 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2019-10-23 13:28:52 +02:00
|
|
|
# installing package, $1 = pacman; $2 = apt-get, $3 = homebrew
|
|
|
|
install() {
|
|
|
|
if [ $debian == true ] && [ $2 != 'null' ]; then
|
|
|
|
sudo apt-get install $2
|
|
|
|
elif [ $arch == true ] && [ $1 != 'null' ]; then
|
|
|
|
sudo pacman -S $1
|
|
|
|
elif [ $mac == true ] && [ $3 != 'null' ]; then
|
|
|
|
sudo brew install $3
|
|
|
|
fi
|
|
|
|
}
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-10-23 13:28:52 +02:00
|
|
|
os_info
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-10-23 13:28:52 +02:00
|
|
|
install 'clang' 'clang' 'clang'
|
|
|
|
install 'make' 'make' 'make'
|
|
|
|
install 'cmake' 'cmake' 'cmake'
|
|
|
|
install 'null' 'clang-tidy' 'clang-tidy'
|
|
|
|
install 'fltk' 'libfltk1.3 libfltk1.3-dev' 'fltk'
|
|
|
|
install 'catch2' 'null' 'catch2'
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-10-23 13:28:52 +02:00
|
|
|
if [[ $apt ]]; then
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-10-23 13:28:52 +02:00
|
|
|
git clone https://github.com/catchorg/Catch2.git
|
|
|
|
cd Catch2
|
|
|
|
cmake -Bbuild -H. -DBUILD_TESTING=OFF
|
|
|
|
sudo cmake --build build/ --target install
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-10-23 13:28:52 +02:00
|
|
|
fi
|
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-10-23 13:28:52 +02:00
|
|
|
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/library.git
|
|
|
|
mkdir library/build
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-10-23 13:28:52 +02:00
|
|
|
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/shared-memory.git
|
|
|
|
mkdir shared-memory/build
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-10-23 13:28:52 +02:00
|
|
|
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/text-renderer.git
|
|
|
|
mkdir text-renderer/build
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-10-23 13:28:52 +02:00
|
|
|
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/gui.git
|
|
|
|
mkdir gui/build
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-10-23 13:28:52 +02:00
|
|
|
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/terminal.git
|
|
|
|
mkdir terminal/build
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-10-23 13:28:52 +02:00
|
|
|
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/simple-draw.git
|
|
|
|
mkdir simple-draw/build
|
2019-10-10 10:46:11 +02:00
|
|
|
|
2019-10-23 13:28:52 +02:00
|
|
|
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/demo.git
|
|
|
|
mkdir demo/build
|
2019-10-10 10:46:11 +02: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"
|
|
|
|
./build.sh
|