mirror of https://github.com/akelge/zsh
Added awslogin function, that uses saml2aws
This commit is contained in:
parent
701ea57d10
commit
58f5f25325
|
@ -19,11 +19,11 @@ autoload -U bak
|
||||||
# fancyTerm - returns true if we are on xterm/rxvt/screen, elsewhere false
|
# fancyTerm - returns true if we are on xterm/rxvt/screen, elsewhere false
|
||||||
autoload -U fancyTerm
|
autoload -U fancyTerm
|
||||||
|
|
||||||
# repo_char - returns a character based on the type of repo we are in
|
# # repo_char - returns a character based on the type of repo we are in
|
||||||
autoload -U repo_char
|
# autoload -U repo_char
|
||||||
|
|
||||||
# repo_char - returns a character based on the type of repo we are in
|
|
||||||
autoload -U x509
|
autoload -U x509
|
||||||
|
|
||||||
|
autoload -U awslogin
|
||||||
|
|
||||||
# vim: set ts=4 sw=4 tw=0 ft=zsh :
|
# vim: set ts=4 sw=4 tw=0 ft=zsh :
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
if [[ -z "$1" ]]
|
||||||
|
then
|
||||||
|
unset AWS_DEFAULT_PROFILE AWS_PROFILE AWS_EB_PROFILE
|
||||||
|
echo AWS profile cleared.
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
saml2aws login -a $1 -p $1
|
||||||
|
eval $(saml2aws script -a $1 -p $1 --skip-prompt)
|
||||||
|
export AWS_DEFAULT_PROFILE=$1
|
||||||
|
export AWS_PROFILE=$1
|
||||||
|
export AWS_EB_PROFILE=$1
|
Binary file not shown.
Loading…
Reference in New Issue