This repository was archived by the owner on May 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuildMono
More file actions
executable file
·51 lines (41 loc) · 1.49 KB
/
buildMono
File metadata and controls
executable file
·51 lines (41 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# Installs mono from source. Might be unstable. If on OSX, might as well install Xamarin.
if [[ "$(uname)" == "Linux" ]]; then
PREFIX=$@
if [ -z $PREFIX ]; then
PREFIX="/usr/local"
fi
# Ensure you have write permissions to PREFIX
sudo mkdir $PREFIX
sudo chown -R `whoami` $PREFIX
# Ensure that all required packages are installed.
sudo apt-get install -y git autoconf libtool automake build-essential mono-devel gettext
PATH=$PREFIX/bin:$PATH
git clone https://github.com/mono/mono.git
cd mono
./autogen.sh --prefix=$PREFIX
make
make install
else
if [[ "$(uname)" == "Darwin" ]]; then
PREFIX=/usr/local
# Ensure you have write permissions to /usr/local
mkdir $PREFIX
sudo chown -R `whoami` $PREFIX
PATH=$PREFIX/bin:$PATH
# Download and build dependencies
mkdir ~/Build
cd ~/Build
curl -O ftp://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz
curl -O ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
curl -O ftp://ftp.gnu.org/gnu/automake/automake-1.14.tar.gz
curl -O ftp://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz
for i in *.tar.gz; do tar xzvf $i; done
for i in */configure; do (cd `dirname $i`; ./configure --prefix=$PREFIX && make && make install); done
git clone https://github.com/mono/mono.git
cd mono
./autogen.sh --prefix=$PREFIX --disable-nls
make
make install
fi
fi