Last active
August 29, 2015 14:17
-
-
Save eugeneagafonov/4cbef2eab29bf8636ab2 to your computer and use it in GitHub Desktop.
shell script for installing latest mono on ubuntu 14.04
This file contains hidden or 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 | |
PREFIX=$@ | |
if [ -z $PREFIX ]; then | |
PREFIX="/usr/local" | |
fi | |
# Ensure you have write permissions to PREFIX | |
sudo mkdir -p $PREFIX | |
sudo chown -R `whoami` $PREFIX | |
# Ensure that all required packages are installed. | |
sudo apt-get install -qqy git autoconf libtool automake build-essential mono-devel gettext unzip | |
apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/* | |
apt-key adv --keyserver pgp.mit.edu --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF | |
echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/3.12.0 main" > /etc/apt/sources.list.d/mono-xamarin.list \ | |
&& apt-get update \ | |
&& apt-get install -y mono-devel ca-certificates-mono fsharp mono-vbnc nuget | |
mozroots --import --sync | |
mkdir /etc/mono/registry | |
chmod uog+rw /etc/mono/registry | |
PATH=$PREFIX/bin:$PATH | |
cd ~/ | |
sudo -u ${SUDO_USER} bash -c "git clone https://github.com/mono/mono.git && cd mono && git branch -b lastgoodbuild && git reset --hard 6a74b19" | |
cd ~/mono | |
./autogen.sh --prefix=$PREFIX | |
make | |
make install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment