感谢支持
我们一直在努力

Linux下一键安装 PowerShell 的bash脚本

说明

目前,Linux下的PowerShell约等于pash。希望大家专注mono,关注pash。一键安装脚本包括for CentOS6,centos7,Ubuntu 14.04  ubuntu 14.10。

安装脚本是用yum或apt安装,mono官方最新版,然后编译安装pash最新版,最后生成两个命令:

mybuild用于编译pash

mypash用于运行pash

1 centos6

#!/bin/bash
# centos6,一键安装mono,pash的shell脚本。
# centos 6.6 测试通过。
# 在linux下用: 
# cd    xxxx   
# xxxx 为要进入的目录。   
# bash  ./install_pash.txt     
# 运行。

#脚本开始
yum  -y  install wget git

#安装mono
#http://software.openSUSE.org/download/package?project=home:tpokorra:mono&package=mono-opt
cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/home:tpokorra:mono/CentOS_CentOS-6/home:tpokorra:mono.repo
yum  -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

2 centos7

#!/bin/bash
# centos7,一键安装mono,pash的shell脚本。
# 在linux下用: 
# cd    xxxx   
# xxxx 为要进入的目录。   
# bash  ./centos7_install_pash.txt
# 运行。

#脚本开始
yum  -y  install wget git

#安装mono
#http://software.opensuse.org/download/package?project=home:tpokorra:mono&package=mono-opt
cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/home:tpokorra:mono/CentOS_CentOS-7/home:tpokorra:mono.repo
yum  -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

3 ubuntu 14.04

#!/bin/bash
# ubuntu14.04,一键安装mono,pash的shell脚本。
# ubuntu 14.04 测试通过。
# 在linux下用: 
# cd    xxxx   
# xxxx 为要进入的目录。   
# bash  ./ubuntu1404_install_pash.txt     
# 运行。

#脚本开始
sudo apt-get update
sudo apt-get  -y  install wget git

# http://software.opensuse.org/download/package?project=home:tpokorra:mono&package=mono-opt
#安装mono
wget http://download.opensuse.org/repositories/home:tpokorra:mono/xUbuntu_14.04/Release.key
sudo apt-key add – < Release.key 

sudo sh -c “echo ‘deb http://download.opensuse.org/repositories/home:/tpokorra:/mono/xUbuntu_14.04/ /’ >> /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

4 ubuntu14.10

#!/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

# http://software.opensuse.org/download/package?project=home:tpokorra:mono&package=mono-opt
#安装mono
wget http://download.opensuse.org/repositories/home:tpokorra:mono/xUbuntu_14.10/Release.key
sudo apt-key add – < Release.key

sudo sh -c “echo ‘deb http://download.opensuse.org/repositories/home:/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

本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-02/113090.htm

赞(0) 打赏
转载请注明出处:服务器评测 » Linux下一键安装 PowerShell 的bash脚本
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏