82 lines
1.2 KiB
Bash
82 lines
1.2 KiB
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
# installing package, $1 = pacman; $2 = apt-get
|
||
|
install() {
|
||
|
declare -A osInfo;
|
||
|
osInfo[/etc/arch-release]=pacman
|
||
|
osInfo[/etc/debian_version]=apt-get
|
||
|
|
||
|
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
|
||
|
fi
|
||
|
fi
|
||
|
done
|
||
|
}
|
||
|
|
||
|
# check operating system
|
||
|
|
||
|
|
||
|
os = 'unknown'
|
||
|
case "$(uname -s)" in
|
||
|
Darwin)
|
||
|
os = 'mac'
|
||
|
;;
|
||
|
|
||
|
Linux)
|
||
|
echo 'Linux'
|
||
|
;;
|
||
|
|
||
|
CYGWIN*|MINGW*|MSYS*)
|
||
|
os = 'windows'
|
||
|
;;
|
||
|
|
||
|
# Add here more strings to compare
|
||
|
# See correspondence table at the bottom of this answer
|
||
|
|
||
|
*)
|
||
|
echo 'other OS'
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
echo $os
|
||
|
|
||
|
# install git
|
||
|
|
||
|
install 'git' 'git'
|
||
|
|
||
|
# install g++/clang
|
||
|
|
||
|
install 'g++' 'g++'
|
||
|
|
||
|
# install make
|
||
|
|
||
|
install 'make' 'make'
|
||
|
|
||
|
# install cmake
|
||
|
|
||
|
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
|