#!/bin/bash
# ubuntu14.10,一键安装mono,pash的shell脚本。
# 在linux下用:
# cd xxxx
# xxxx 为要进入的目录。
# bash ./ubuntu14010_install_pash.txt
# 运行。
#脚本开始
sudo apt-get update
sudo apt-get -y install wget git
# ?project=home:tpokorra:mono&package=mono-opt
#安装mono
wget :tpokorra:mono/xUbuntu_14.10/Release.key
sudo apt-key add - < Release.key
sudo sh -c "echo 'deb :/tpokorra:/mono/xUbuntu_14.10/ /' >> /etc/apt/sources.list.d/mono-opt.list"
sudo apt-get update
sudo apt-get -y install mono-opt
# 建立两个bash的alias,
#mybuild为编译,或更新pash
#mypash为运行pash
# powershell 传教士 原创 2015-02-01 允许转载,但必须保留名字和出处,否则追究法律责任
echo "alias mybuild='cd / ;rm -rf /Pash ; git clone https://github.com/Pash-Project/Pash.git ; cd /Pash/ ; /opt/mono/bin/xbuild /Pash/Pash.proj'" >> /root/.bashrc
echo "alias mypash='/opt/mono/bin/mono /Pash/Source/PashConsole/bin/Debug/Pash.exe'" >> /root/.bashrc
#安装pash
cd /
rm -rf /Pash
git clone https://github.com/Pash-Project/Pash.git
cd /Pash/
/opt/mono/bin/xbuild /Pash/Pash.proj
sleep 6
#运行
/opt/mono/bin/mono /Pash/Source/PashConsole/bin/Debug/Pash.exe