fix syntax for mac
This commit is contained in:
parent
109fcf0898
commit
7a7bbf12c7
16
install.sh
16
install.sh
@ -1,18 +1,10 @@
|
|||||||
#!/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
|
|
||||||
osInfo[/usr/bin/apt]=apt
|
|
||||||
osInfo[/usr/local/Homebrew]=brew
|
|
||||||
|
|
||||||
for f in ${!osInfo[@]}
|
|
||||||
do
|
|
||||||
if [[ -f $f ]];then
|
|
||||||
if [[ ${osInfo[$f]} == 'pacman' ]]; then
|
|
||||||
sudo pacman -S clang make cmake fltk catch2
|
sudo pacman -S clang make cmake fltk catch2
|
||||||
|
|
||||||
elif [[ ${osInfo[$f]} == 'apt' ]]; then
|
elif [[ -f /usr/bin/apt ]]; then
|
||||||
sudo 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
|
||||||
@ -21,12 +13,10 @@ install_packages() {
|
|||||||
sudo cmake --build build/ --target install
|
sudo cmake --build build/ --target install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
elif [[ ${osInfo[$f]} == 'brew' ]]; then
|
elif [[ -f /usr/local/Homebrew ]]; then
|
||||||
sudo brew install llvm clang make cmake clang-format fltk catch2
|
sudo brew install llvm clang make cmake clang-format fltk catch2
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user