-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(aws-install): add install for aws toolchain
* use homebrew on both macOS and Linux * migrate linux installations to support homebrew * add set-python-path to support aws toolchain * update readme to include tested operating systems NOTE: This update was tested on: * macOS Mojave * ubuntu 18.04 * fedora 29 * centOS 7 * debian 9 * mint 19
- Loading branch information
1 parent
d3a9c60
commit 4989391
Showing
18 changed files
with
218 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
__am-prompt-aws-install() { | ||
local BREWS=(awscli aws-sam-cli) | ||
|
||
brew tap aws/tap | ||
brew update | ||
|
||
for pkg in "${BREWS[@]}"; do | ||
if brew list -1 | grep -q "^${pkg}\$"; then | ||
echo "upgrading: $pkg..." | ||
brew upgrade $pkg 2>/dev/null | ||
brew link --overwrite $pkg 2>/dev/null | ||
else | ||
echo "installing: $pkg..." | ||
brew install $pkg | ||
fi | ||
done | ||
|
||
echo | ||
echo "configuring aws..." | ||
echo | ||
aws configure | ||
} | ||
|
||
__am-prompt-aws-install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ -f "$HOME/.linuxbrew/bin/brew" ]; then | ||
eval $("$HOME/.linuxbrew/bin/brew" shellenv) | ||
fi | ||
|
||
if [ -f /home/linuxbrew/.linuxbrew/bin/brew ]; then | ||
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
PYTHON=$(command -v python3 2>/dev/null || command -v python 2>/dev/null) | ||
|
||
if [ -f $PYTHON ]; then | ||
USER_BASE_PATH=$($PYTHON -m site --user-base) | ||
export PATH=$PATH:$USER_BASE_PATH/bin | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ -e $HOME/.am/prompt/bashrc ]; then | ||
if [ -f $HOME/.am/prompt/bashrc ]; then | ||
source $HOME/.am/prompt/bashrc | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
__am-prompt-install-centos() { | ||
local YUM=$(command -v dnf 2>/dev/null || command -v yum) | ||
local PACKAGES=(curl file git) | ||
|
||
__am-prompt-success "installing development tools..." | ||
sudo $YUM groupinstall -y "Development Tools" | ||
|
||
for pkg in "${PACKAGES[@]}"; do | ||
__am-prompt-success "installing $pkg..." | ||
sudo $YUM install -y ${pkg} | ||
done | ||
|
||
source "$SCRIPT_DIR/uname/install-linux.sh" | ||
} | ||
|
||
__am-prompt-install-centos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,20 @@ | ||
CLR_SUCCESS="\033[1;32m" # BRIGHT GREEN | ||
CLR_CLEAR="\033[0m" # DEFAULT COLOR | ||
#!/usr/bin/env bash | ||
|
||
success() { | ||
echo -e "${CLR_SUCCESS}$1${CLR_CLEAR}" | ||
} | ||
|
||
sudo add-apt-repository ppa:git-core/ppa -y 1>/dev/null 2>&1 | ||
sudo apt-get update 1>/dev/null | ||
__am-prompt-install-debian() { | ||
local PACKAGES=(build-essential curl file git) | ||
|
||
for pkg in git-flow; do | ||
if apt list $pkg | grep -q "&${pkg}(.*)\[installed\]$" 2>/dev/null; then | ||
sudo apt-get remove -y $pkg 1>/dev/null | ||
fi | ||
done | ||
__am-prompt-success "updating software repositories..." | ||
sudo apt-get update | ||
|
||
for pkg in openssl git build-essential libssl-dev curl libunwind8 gettext; do | ||
success "Installing $pkg..." | ||
sudo apt-get install -y ${pkg} | ||
done | ||
for pkg in "${PACKAGES[@]}"; do | ||
__am-prompt-success "installing $pkg..." | ||
sudo apt-get install -y ${pkg} | ||
done | ||
|
||
sudo apt-get autoremove -y 1>/dev/null | ||
__am-prompt-success "removing unnecessary dependencies..." | ||
sudo apt-get autoremove -y | ||
|
||
curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash | ||
|
||
export NVM_DIR="$HOME/.nvm" | ||
source "$NVM_DIR/nvm.sh" | ||
source "$SCRIPT_DIR/uname/install-linux.sh" | ||
} | ||
|
||
nvm install --lts 1>/dev/null | ||
nvm use --lts --delete-prefix 1>/dev/null | ||
__am-prompt-install-debian |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,3 @@ | ||
CLR_SUCCESS="\033[1;32m" # BRIGHT GREEN | ||
CLR_CLEAR="\033[0m" # DEFAULT COLOR | ||
#!/usr/bin/env bash | ||
|
||
success() { | ||
echo -e "${CLR_SUCCESS}$1${CLR_CLEAR}" | ||
} | ||
|
||
for pkg in openssl git libunwind libicu; do | ||
success "Installing $pkg..." | ||
sudo dnf install ${pkg} | ||
done | ||
|
||
curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash | ||
|
||
export NVM_DIR="$HOME/.nvm" | ||
source "$NVM_DIR/nvm.sh" | ||
|
||
nvm install --lts 1>/dev/null | ||
nvm use --lts --delete-prefix 1>/dev/null | ||
source "$SCRIPT_DIR/uname/install-centos.sh" |
Oops, something went wrong.