Browse Source

LSB Release instead uname if we can

pull/87/head
wipedlifepotato 10 months ago
parent
commit
114fd1cfe7
  1. 59
      dependencies.sh

59
dependencies.sh

@ -14,14 +14,55 @@ dependWin="mingw-w64-x86_64-boost \
mingw-w64-x86_64-zlib" mingw-w64-x86_64-zlib"
kernel=`uname -a` kernel=`uname -a`
function isLsbReleaseExists() {
if which lsb_release > /dev/null; # do whereis can be too?
then
return 0
else
return 1
fi
}
case "$kernel" in function anotherDistr(){
*Ubuntu*|*Debian*) echo "Just install libboost and libopenssl dev packages on your pc";
sudo apt install $dependNix;; return 0
*gentoo*) }
sudo emerge --deep --newuse dev-libs/boost dev-libs/openssl;;
*MINGW64*) function installDeb(){
pacman -S $dependWin;; sudo apt-get install $dependNix;
*) return 0
echo "Just install libboost and libopenssl dev packages on your pc";; }
function installOnGentoo(){
sudo emerge --deep --newuse dev-libs/boost dev-libs/openssl;
return 0
}
function installOnWin() {
pacman -S $depenWin;
return 0
}
function doInstallDepencies() {
case "$1" in
*Ubuntu*|*Debian*)
installDeb
;;
*gentoo*)
installOnGentoo
;;
*MINGW64*)
installOnWin
;;
*)
anotherDistr
;;
esac esac
}
if isLsbReleaseExists ;
then
distr=`lsb_release -i`
doInstallDepencies "$distr"
else #
doInstallDepencies "$kernel"
fi

Loading…
Cancel
Save