webinstall / webi-installer-requests

This is just to house issues for requests for new Webi installers.
Mozilla Public License 2.0
5 stars 7 forks source link

Request for `aws-cli` - which can now be installed conflict-free #107

Open coolaj86 opened 3 months ago

coolaj86 commented 3 months ago

See also:

  1. Create and secure ~/.aws/credentials

    mkdir -p ~/.aws/
    chmod 0750 ~/.aws
    
    touch ~/.aws/credentials
    chmod 0600 ~/.aws/credentials
    
    touch ~/.aws/config

Linux Conflict-Free Install

curl 'https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip' -o ./awscliv2.zip

unzip ./awscliv2.zip

./aws/install \
    --bin-dir ~/.local/opt/aws-cli \
    --install-dir ~/.local/opt/aws-cli \
    --update

macOS Conflict-Free Install

  1. Create ~/.aws/choices.xml with your local install directory
    mkdir -p ~/.aws/
    mkdir -p ~/.local/opt
    echo '<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
      <array>
        <dict>
          <key>choiceAttribute</key>
          <string>customLocation</string>
          <key>attributeSetting</key>
          <string>'"$HOME/.local/opt"'</string>
          <key>choiceIdentifier</key>
          <string>default</string>
        </dict>
      </array>
    </plist>' > ~/.aws/choices.xml
  2. Install the AWS CLI pkg using the conflict-free install directory

    curl 'https://awscli.amazonaws.com/AWSCLIV2.pkg' -o ./AWSCLIV2.pkg
    
    installer -pkg ./AWSCLIV2.pkg \
        -target 'CurrentUserHomeDirectory' \
        -applyChoiceChangesXML ~/.aws/choices.xml
    
    rm ./AWSCLIV2.pkg