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

     1  # Installs the porter CLI for a single user.
     2  param(
     3      [String]
     4      # The version of Porter to install, such as vX.Y.Z, latest or canary.
     5      $PORTER_VERSION='latest',
     6      [String]
     7      # Location where Porter is installed (defaults to ~/.porter).
     8      $PORTER_HOME="$env:USERPROFILE\.porter",
     9      [String]
    10      # Base URL where Porter assets, such as binaries and atom feeds, are downloaded. This lets you setup an internal mirror.
    11      $PORTER_MIRROR="https://cdn.porter.sh")
    12  
    13  echo "Installing porter@$PORTER_VERSION to $PORTER_HOME from $PORTER_MIRROR"
    14  
    15  $env:PORTER_HOME=$PORTER_HOME
    16  $env:PORTER_MIRROR=$PORTER_MIRROR
    17  mkdir -f $PORTER_HOME/runtimes
    18  
    19  (new-object System.Net.WebClient).DownloadFile("$PORTER_MIRROR/$PORTER_VERSION/porter-windows-amd64.exe", "$PORTER_HOME\porter.exe")
    20  (new-object System.Net.WebClient).DownloadFile("$PORTER_MIRROR/$PORTER_VERSION/porter-linux-amd64", "$PORTER_HOME\runtimes\porter-runtime")
    21  echo "Installed $(& $PORTER_HOME\porter.exe version)"
    22  
    23  & $PORTER_HOME/porter mixin install exec --version $PORTER_VERSION
    24  
    25  echo "Installation complete."
    26  echo "Add porter to your path by adding the following line to your Microsoft.PowerShell_profile.ps1 and open a new terminal:"
    27  echo '$env:PATH+=";$env:USERPROFILE\.porter"'