2021-09-24 16:20:54 +00:00
|
|
|
#!/bin/zsh
|
2022-02-06 07:15:14 +00:00
|
|
|
source "$HOME/.config/wryn/env.zsh"
|
2021-09-24 16:20:54 +00:00
|
|
|
source $ZSH_COLOR_UTIL
|
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
|
|
|
|
CONFIGURE() {
|
|
|
|
CHECK "checking for '$DOTWRYN_AWS_PROFILE' aws credentials"
|
|
|
|
grep -q "^\\[$DOTWRYN_AWS_PROFILE\\]$" "$HOME/.aws/credentials" \
|
|
|
|
&& { OK; return 0 } || WARN
|
|
|
|
|
|
|
|
USER_PROMPT "set up credentials now? [Y/n]"
|
|
|
|
READ_K yn
|
|
|
|
[[ $yn =~ ^[nN] ]] && return 1
|
|
|
|
|
|
|
|
aws --profile $DOTWRYN_AWS_PROFILE configure
|
|
|
|
}
|
|
|
|
|
|
|
|
CONFIGURE
|