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
|
||||
|
||||
install_packages() {
|
||||
declare -A osInfo;
|
||||
osInfo[/usr/bin/pacman]=pacman
|
||||
osInfo[/usr/bin/apt]=apt
|
||||
osInfo[/usr/local/Homebrew]=brew
|
||||
if [[ -f /usr/bin/pacman ]]; then
|
||||
sudo pacman -S clang make cmake fltk catch2
|
||||
|
||||
for f in ${!osInfo[@]}
|
||||
do
|
||||
if [[ -f $f ]];then
|
||||
if [[ ${osInfo[$f]} == 'pacman' ]]; then
|
||||
sudo pacman -S clang make cmake fltk catch2
|
||||
elif [[ -f /usr/bin/apt ]]; then
|
||||
sudo apt install clang make cmake clang-tidy libfltk1.3 libfltk1.3-dev
|
||||
|
||||
elif [[ ${osInfo[$f]} == 'apt' ]]; then
|
||||
sudo apt install clang make cmake clang-tidy libfltk1.3 libfltk1.3-dev
|
||||
git clone https://github.com/catchorg/Catch2.git
|
||||
cd Catch2
|
||||
cmake -Bbuild -H. -DBUILD_TESTING=OFF
|
||||
sudo cmake --build build/ --target install
|
||||
cd ..
|
||||
|
||||
git clone https://github.com/catchorg/Catch2.git
|
||||
cd 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
|
||||
elif [[ -f /usr/local/Homebrew ]]; then
|
||||
sudo brew install llvm clang make cmake clang-format fltk catch2
|
||||
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user