+ build & update & install script
This commit is contained in:
parent
7654c1f577
commit
f5f1a8dcee
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo 'building all components'
|
||||
|
||||
cd ..
|
||||
|
||||
for d in */; do
|
||||
cd "$d"
|
||||
FILE=build
|
||||
if [ -f $FILE ]; then
|
||||
echo 'building component ' + $d
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
make test
|
||||
cd ..
|
||||
fi
|
||||
|
||||
cd ..
|
||||
done
|
|
@ -1,81 +1,84 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
# installing package, $1 = pacman; $2 = apt-get
|
||||
install() {
|
||||
debian=false;
|
||||
arch=false;
|
||||
mac=false;
|
||||
|
||||
# get operating system
|
||||
os_info() {
|
||||
declare -A osInfo;
|
||||
osInfo[/etc/arch-release]=pacman
|
||||
osInfo[/etc/debian_version]=apt-get
|
||||
osInfo[/etc/arch-release]=arch
|
||||
osInfo[/etc/debian_version]=debian
|
||||
osInfo[/usr/local/Homebrew]=mac
|
||||
|
||||
for f in ${!osInfo[@]}
|
||||
do
|
||||
if [[ -f $f ]];then
|
||||
manager = ${osInfo[$f]}
|
||||
if [[manager == 'pacman']] then
|
||||
pacman -S $1
|
||||
elif [[ manager == 'apt-get' ]]; then
|
||||
apt-get install $2
|
||||
if [[ ${osInfo[$f]} == 'arch' ]]; then
|
||||
arch=true;
|
||||
elif [[ ${osInfo[$f]} == 'debian' ]]; then
|
||||
debian=true;
|
||||
elif [[ ${osInfo[$f]} == 'mac' ]]; then
|
||||
mac=true;
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# check operating system
|
||||
# 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
|
||||
}
|
||||
|
||||
os_info
|
||||
|
||||
os = 'unknown'
|
||||
case "$(uname -s)" in
|
||||
Darwin)
|
||||
os = 'mac'
|
||||
;;
|
||||
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'
|
||||
|
||||
Linux)
|
||||
echo 'Linux'
|
||||
;;
|
||||
if [[ $apt ]]; then
|
||||
|
||||
CYGWIN*|MINGW*|MSYS*)
|
||||
os = 'windows'
|
||||
;;
|
||||
git clone https://github.com/catchorg/Catch2.git
|
||||
cd Catch2
|
||||
cmake -Bbuild -H. -DBUILD_TESTING=OFF
|
||||
sudo cmake --build build/ --target install
|
||||
|
||||
# Add here more strings to compare
|
||||
# See correspondence table at the bottom of this answer
|
||||
fi
|
||||
|
||||
*)
|
||||
echo 'other OS'
|
||||
;;
|
||||
esac
|
||||
echo "cloning repositories"
|
||||
cd ..
|
||||
|
||||
echo $os
|
||||
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/library.git
|
||||
mkdir library/build
|
||||
|
||||
# install git
|
||||
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/shared-memory.git
|
||||
mkdir shared-memory/build
|
||||
|
||||
install 'git' 'git'
|
||||
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/text-renderer.git
|
||||
mkdir text-renderer/build
|
||||
|
||||
# install g++/clang
|
||||
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/gui.git
|
||||
mkdir gui/build
|
||||
|
||||
install 'g++' 'g++'
|
||||
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/terminal.git
|
||||
mkdir terminal/build
|
||||
|
||||
# install make
|
||||
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/simple-draw.git
|
||||
mkdir simple-draw/build
|
||||
|
||||
install 'make' 'make'
|
||||
git clone ssh://git@gitlab.repo.digitech.hs-emden-leer.de:2222/link/projekte/ws19/vkvm-new/demo.git
|
||||
mkdir demo/build
|
||||
|
||||
# install cmake
|
||||
cd Scripts
|
||||
|
||||
install 'cmake' 'cmake'
|
||||
|
||||
# install fltk
|
||||
|
||||
install 'fltk-dev' 'libfltk1.3 libfltk1.3-dev'
|
||||
|
||||
# install catch2
|
||||
|
||||
install 'catch2' 'catch'
|
||||
|
||||
# clone rendering
|
||||
|
||||
git clone https://gitea.joethei.xyz/vKVM/Rendering.git
|
||||
|
||||
# clone library
|
||||
|
||||
git clone https://gitea.joethei.xyz/vKVM/Library.git
|
||||
|
||||
# clone clients
|
||||
echo "installation completed"
|
||||
./build.sh
|
Loading…
Reference in New Issue