Linux bash script for one-click installation of PowerShell

Source: Internet
Author: User

Linux bash script for one-click installation of PowerShell

Description

Currently, PowerShell in Linux is equivalent to pash. I hope you will focus on mono and pash. One-click installation scripts include for CentOS6, centos7, and Ubuntu 14.04 ubuntu 14.10.

The installation script is installed using yum or apt. mono is the latest official version. Compile and install the latest version of pash and generate two commands:

Mybuild is used to compile pash

Mypash is used to run pash

1 centos6

#! /Bin/bash
# Centos6: one-click installation of mono and pash shell scripts.
# Centos 6.6 passed the test.
# In linux:
# Cd xxxx
# Xxxx is the directory to enter.
# Bash./install_pash.txt
# Run.

# Script start
Yum-y install wget git

# Install 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

# Create two bash alias,
# Mybuild: compile or update pash
# Mypash: Run pash
# Powershell missionary original may be reprinted, but the name and source must be retained; otherwise, legal liability shall be held.
Echo "alias mybuild = 'CD/; rm-rf/Pash; git clone https://github.com/Pash-Project/Pash.git; cd/Pash/;/opt/mono/bin/xbuild/Pash. proj' ">/root /. bashrc
Echo "alias mypash = '/opt/mono/bin/mono/Pash/Source/PashConsole/bin/Debug/Pash.exe'">/root/. bashrc


# Install pash
Cd/
Rm-rf/Pash
Git clone https://github.com/Pash-Project/Pash.git
Cd/Pash/
/Opt/mono/bin/xbuild/Pash. proj

Sleep 6

# Run
/Opt/mono/bin/mono/Pash/Source/PashConsole/bin/Debug/Pash.exe

2 centos7

#! /Bin/bash
# Centos7: one-click installation of mono and pash shell scripts.
# In linux:
# Cd xxxx
# Xxxx is the directory to enter.
# Bash./centos7_install_pash.txt
# Run.

# Script start
Yum-y install wget git

# Install 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

# Create two bash alias,
# Mybuild: compile or update pash
# Mypash: Run pash
# Powershell missionary original may be reprinted, but the name and source must be retained; otherwise, legal liability shall be held.
Echo "alias mybuild = 'CD/; rm-rf/Pash; git clone https://github.com/Pash-Project/Pash.git; cd/Pash/;/opt/mono/bin/xbuild/Pash. proj' ">/root /. bashrc
Echo "alias mypash = '/opt/mono/bin/mono/Pash/Source/PashConsole/bin/Debug/Pash.exe'">/root/. bashrc

# Install pash
Cd/
Rm-rf/Pash
Git clone https://github.com/Pash-Project/Pash.git
Cd/Pash/
/Opt/mono/bin/xbuild/Pash. proj

Sleep 6

# Run
/Opt/mono/bin/mono/Pash/Source/PashConsole/bin/Debug/Pash.exe

3 ubuntu 14.04

#! /Bin/bash
# Ubuntu14.04: one-click installation of mono and pash shell scripts.
# Ubuntu 14.04 passed the test.
# In linux:
# Cd xxxx
# Xxxx is the directory to enter.
# Bash./ubuntu1404_install_pash.txt
# Run.

# Script start
Sudo apt-get update
Sudo apt-get-y install wget git

# Http://software.opensuse.org/download/package? Project = home: tpokorra: mono & package = mono-opt
# Install 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

# Create two bash alias,
# Mybuild: compile or update pash
# Mypash: Run pash
# Powershell missionary original may be reprinted, but the name and source must be retained; otherwise, legal liability shall be held.
Echo "alias mybuild = 'CD/; rm-rf/Pash; git clone https://github.com/Pash-Project/Pash.git; cd/Pash/;/opt/mono/bin/xbuild/Pash. proj' ">/root /. bashrc
Echo "alias mypash = '/opt/mono/bin/mono/Pash/Source/PashConsole/bin/Debug/Pash.exe'">/root/. bashrc

# Install pash
Cd/
Rm-rf/Pash
Git clone https://github.com/Pash-Project/Pash.git
Cd/Pash/
/Opt/mono/bin/xbuild/Pash. proj

Sleep 6

# Run
/Opt/mono/bin/mono/Pash/Source/PashConsole/bin/Debug/Pash.exe

4 ubuntu14.10

#! /Bin/bash
# Ubuntu14.10: one-click installation of mono and pash shell scripts.
# In linux:
# Cd xxxx
# Xxxx is the directory to enter.
# Bash./ubuntu14010_install_pash.txt
# Run.

# Script start
Sudo apt-get update
Sudo apt-get-y install wget git

# Http://software.opensuse.org/download/package? Project = home: tpokorra: mono & package = mono-opt
# Install 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

# Create two bash alias,
# Mybuild: compile or update pash
# Mypash: Run pash
# Powershell missionary original may be reprinted, but the name and source must be retained; otherwise, legal liability shall be held.
Echo "alias mybuild = 'CD/; rm-rf/Pash; git clone https://github.com/Pash-Project/Pash.git; cd/Pash/;/opt/mono/bin/xbuild/Pash. proj' ">/root /. bashrc
Echo "alias mypash = '/opt/mono/bin/mono/Pash/Source/PashConsole/bin/Debug/Pash.exe'">/root/. bashrc

# Install pash
Cd/
Rm-rf/Pash
Git clone https://github.com/Pash-Project/Pash.git
Cd/Pash/
/Opt/mono/bin/xbuild/Pash. proj

Sleep 6

# Run
/Opt/mono/bin/mono/Pash/Source/PashConsole/bin/Debug/Pash.exe

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.