fix syntax for mac
This commit is contained in:
parent
109fcf0898
commit
7a7bbf12c7
34
install.sh
34
install.sh
@ -1,32 +1,22 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
install_packages() {
|
install_packages() {
|
||||||
declare -A osInfo;
|
if [[ -f /usr/bin/pacman ]]; then
|
||||||
osInfo[/usr/bin/pacman]=pacman
|
sudo pacman -S clang make cmake fltk catch2
|
||||||
osInfo[/usr/bin/apt]=apt
|
|
||||||
osInfo[/usr/local/Homebrew]=brew
|
|
||||||
|
|
||||||
for f in ${!osInfo[@]}
|
elif [[ -f /usr/bin/apt ]]; then
|
||||||
do
|
sudo apt install clang make cmake clang-tidy libfltk1.3 libfltk1.3-dev
|
||||||
if [[ -f $f ]];then
|
|
||||||
if [[ ${osInfo[$f]} == 'pacman' ]]; then
|
|
||||||
sudo pacman -S clang make cmake fltk catch2
|
|
||||||
|
|
||||||
elif [[ ${osInfo[$f]} == 'apt' ]]; then
|
git clone https://github.com/catchorg/Catch2.git
|
||||||
sudo apt install clang make cmake clang-tidy libfltk1.3 libfltk1.3-dev
|
cd Catch2
|
||||||
|
cmake -Bbuild -H. -DBUILD_TESTING=OFF
|
||||||
|
sudo cmake --build build/ --target install
|
||||||
|
cd ..
|
||||||
|
|
||||||
git clone https://github.com/catchorg/Catch2.git
|
elif [[ -f /usr/local/Homebrew ]]; then
|
||||||
cd Catch2
|
sudo brew install llvm clang make cmake clang-format fltk catch2
|
||||||
cmake -Bbuild -H. -DBUILD_TESTING=OFF
|
|
||||||
sudo cmake --build build/ --target install
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
elif [[ ${osInfo[$f]} == 'brew' ]]; then
|
|
||||||
sudo brew install llvm clang make cmake clang-format fltk catch2
|
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user