Created
October 20, 2014 20:49
-
-
Save donkaban/1213849a8b5eb1fbb02c to your computer and use it in GitHub Desktop.
Debian Toolset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VERSION="5.0 (ubuntu 14.04 x86_64 LTS)" | |
ERR_COLOR="\033[31m" | |
WRN_COLOR="\033[33m" | |
NFO_COLOR="\033[32m" | |
SCRIPT_NAME=`basename $0` | |
ARCH=$(uname -i) | |
NAME=$(lsb_release -si) | |
############################################################################ | |
function err { | |
echo -e "\n" $ERR_COLOR $1 $2 $3 $4 $5 $6 "\n" ; tput sgr0; | |
} | |
function msg { | |
echo -e $NFO_COLOR $1 $2 $3 $4 $5 $6 ; tput sgr0; | |
} | |
function wrn { | |
echo -e $WRN_COLOR $1 $2 $3 $4 $5 $6 ; tput sgr0; | |
} | |
function install { | |
wrn "install: " $1 $2 $3 $4 $5 $6 $7 $8 | |
apt-get install -y $1 $2 $3 $4 $5 $6 $7 $8 | |
} | |
function remove { | |
wrn "remove: " $1 $2 $3 $4 $5 $6 $7 $8 | |
apt-get remove -y $1 $2 $3 $4 $5 $6 $7 $8 | |
} | |
function fix_sonames { | |
wrn "fix sonames : " $1 | |
cd $1 | |
rm -f ./libstdc++.so | |
rm -f ./libX11.so | |
rm -f ./libXext.so | |
rm -f ./libEGL.so | |
rm -f ./libGLESv2.so | |
rm -f ./libGL.so | |
ln -s ./libstdc++.so.6 ./libstdc++.so | |
ln -s ./libX11.so.6 ./libX11.so | |
ln -s ./libXext.so.6 ./libXext.so | |
ln -s ./mesa/libGL.so.1 ./libGL.so | |
ln -s ./mesa-egl/libEGL.so.1.0.0 ./libEGL.so | |
ln -s ./mesa-egl/libGLESv2.so.2.0.0 ./libGLESv2.so | |
} | |
function install_gcc { | |
install gcc-$1 g++-$1 | |
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-$1 20 | |
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-$1 20 | |
} | |
############################################################################ | |
if [ $NAME != "Ubuntu" -a $NAME != "Debian" a $NAME != "LinuxMint" ]; then | |
err "you must have Ubuntu or Mint or Debian distro" | |
exit 1 | |
fi | |
if [ "$(id -u)" != "0" ]; then | |
err "need root permissions" "try sudo " $SCRIPT_NAME | |
exit 1 | |
fi | |
############################################################################ | |
msg "Install " $ARCH $NAME " synqera linux toolset version " $VERSION | |
update-alternatives --remove-all gcc | |
update-alternatives --remove-all g++ | |
add-apt-repository -y ppa:webupd8team/java | |
add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
apt-get update | |
install git subversion mercurial wget curl sshfs mc | |
install build-essential linux-headers-`uname -r` linux-source | |
install coreutils make scons ccache distcc cmake qt4-qmake | |
install python-pip python-setuptools python-svn | |
pip install hgapi --upgrade | |
pip install paramiko --upgrade | |
install oracle-java7-installer | |
install gperf bison flex texinfo gawk libtool automake | |
install libncurses5-dev libexpat-dev makeinfo sed | |
install_gcc 4.7 | |
install_gcc 4.8 | |
install_gcc 4.9 | |
install mesa-common-dev libgl1-mesa-dev libgles2-mesa-dev freeglut3-dev | |
install libvorbis-dev libogg-dev libtheora-dev libopenal-dev libasound2-dev libsndfile-dev | |
apt-get -y autoremove | |
apt-get -y autoclean | |
update-alternatives --config g++ | |
update-alternatives --config gcc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment