update for cleaner code

This commit is contained in:
Johannes Theiner 2019-10-29 13:48:27 +01:00
parent 777dea9073
commit c9a9ed8305
2 changed files with 5 additions and 6 deletions

0
checkout-dev.sh Normal file → Executable file
View File

View File

@ -1,6 +1,5 @@
#!/bin/bash #!/usr/bin/env bash
# get operating system
install_packages() { install_packages() {
declare -A osInfo; declare -A osInfo;
osInfo[/usr/bin/pacman]=pacman osInfo[/usr/bin/pacman]=pacman
@ -11,10 +10,10 @@ install_packages() {
do do
if [[ -f $f ]];then if [[ -f $f ]];then
if [[ ${osInfo[$f]} == 'pacman' ]]; then if [[ ${osInfo[$f]} == 'pacman' ]]; then
pacman -S clang make cmake fltk catch2 sudo pacman -S clang make cmake fltk catch2
elif [[ ${osInfo[$f]} == 'apt' ]]; then elif [[ ${osInfo[$f]} == 'apt' ]]; then
apt install clang make cmake clang-tidy libfltk1.3 libfltk1.3-dev sudo apt install clang make cmake clang-tidy libfltk1.3 libfltk1.3-dev
git clone https://github.com/catchorg/Catch2.git git clone https://github.com/catchorg/Catch2.git
cd Catch2 cd Catch2
@ -22,7 +21,7 @@ install_packages() {
sudo cmake --build build/ --target install sudo cmake --build build/ --target install
elif [[ ${osInfo[$f]} == 'brew' ]]; then elif [[ ${osInfo[$f]} == 'brew' ]]; then
brew install llvm clang make cmake clang-format fltk catch2 sudo brew install llvm clang make cmake clang-format fltk catch2
fi fi
fi fi
@ -59,4 +58,4 @@ mkdir demo/build
cd installation cd installation
echo "installation completed" echo "installation completed"
./build.sh ./build.sh