get.porter.sh/porter@v1.3.0/scripts/install/install-mac.sh (about)

     1  #!/usr/bin/env bash
     2  set -euo pipefail
     3  
     4  # Installs the porter CLI for a single user.
     5  # PORTER_HOME:      Location where Porter is installed (defaults to ~/.porter).
     6  # PORTER_MIRROR:    Base URL where Porter assets, such as binaries and atom feeds, are downloaded.
     7  #                   This lets you setup an internal mirror.
     8  # PORTER_VERSION:   The version of Porter assets to download.
     9  
    10  export PORTER_HOME=${PORTER_HOME:-~/.porter}
    11  export PORTER_MIRROR=${PORTER_MIRROR:-https://cdn.porter.sh}
    12  PORTER_VERSION=${PORTER_VERSION:-latest}
    13  
    14  echo "Installing porter@$PORTER_VERSION to $PORTER_HOME from $PORTER_MIRROR"
    15  
    16  mkdir -p $PORTER_HOME/runtimes
    17  
    18  curl -fsSLo $PORTER_HOME/porter $PORTER_MIRROR/$PORTER_VERSION/porter-darwin-amd64
    19  curl -fsSLo $PORTER_HOME/runtimes/porter-runtime $PORTER_MIRROR/$PORTER_VERSION/porter-linux-amd64
    20  chmod +x $PORTER_HOME/porter
    21  chmod +x $PORTER_HOME/runtimes/porter-runtime
    22  echo Installed `$PORTER_HOME/porter version`
    23  
    24  $PORTER_HOME/porter mixin install exec --version $PORTER_VERSION
    25  
    26  echo "Installation complete."
    27  echo "Add porter to your path by adding the following line to your ~/.bash_profile or ~/.zprofile and open a new terminal:"
    28  echo "export PATH=\$PATH:~/.porter"