Installation

The installation of the stable version of Mush follows a standard approach, which is straightforward and ideal for most users. Installing the stable release ensures a reliable and tested version suitable for general use. Here’s the standard method:

Installing the stable version

The easiest way to get Mush is to install the current stable release from GitHub using curl. This method will also create a directory at $HOME/.mush/bin, where you can host the scripts you’ll install subsequently.

On Linux and macOS systems, this is done as follows:

$ curl get.javanile.org/mush | sh

However, in some cases, alternative installation methods may be required depending on your specific needs. For example:

  • Running Mush in specialized environments, such as servers with unique configurations.
  • Using Mush in non-Unix-based environments, like Windows.
  • Accessing advanced or experimental features under active development or in testing.

Below are the details for installing Mush in such scenarios.

Installing from the development branch

To test the latest features and changes that have not yet been included in the stable release, you can install Mush from its development branch. This method is intended for advanced users or contributors who want to test new functionalities.

curl get.javanile.org/mush | bash -s -- --branch BRANCHNAME

Valid branch names include develop and zsh. For a complete list of available branches, visit this page.

Installing from source

If you need to build Mush from source, either to customize the tool or to integrate it into specific environments, follow these steps:

  1. Clone the repository:
    $ git clone https://github.com/javanile/mush.git
    
  2. Navigate to the directory:
    $ cd mush
    
  3. Build and install:
    $ ./install.sh
    

Ensure you have the necessary dependencies installed beforehand.

Installing on Windows

For Windows users, Mush can be installed using Windows Subsystem for Linux (WSL) or natively. Here’s how:

  • Using WSL (recommended):
    1. Enable WSL on your system and install a Linux distribution (e.g., Ubuntu).
    2. Follow the standard installation instructions for Linux.
  • Installing natively (experimental):
    1. Download the latest release from GitHub.
    2. Extract the files and add the executable to your PATH.

Note: For optimal performance and compatibility, using WSL is the preferred option.

Installing in other environments

If you’re using Mush in non-standard environments, such as embedded systems, containers, or highly restricted servers, the installation process might require customization:

  1. Ensure that the environment supports a shell interpreter (e.g., bash, zsh).
  2. Download the Mush script manually:
    $ curl -o mush.sh get.javanile.org/mush
    
  3. Adapt the script to your environment’s requirements (e.g., custom paths, dependencies).
  4. Execute the script:
    $ sh mush.sh
    

For further assistance or specific use cases, feel free to check the documentation or reach out to the Mush community.


© 2024 Francesco Bianco. All rights reserved.