mirror of https://github.com/akelge/zsh
Improve awslogin function
This commit is contained in:
parent
66df77560a
commit
85e6b157b5
|
@ -1,11 +1,13 @@
|
||||||
if [[ -z "$1" ]]
|
if [ $1 ]; then
|
||||||
then
|
export AWS_DEFAULT_PROFILE=$1
|
||||||
|
export AWS_PROFILE=$1
|
||||||
|
export AWS_EB_PROFILE=$1
|
||||||
|
return
|
||||||
|
elif [ $AWS_PROFILE ]; then
|
||||||
unset AWS_DEFAULT_PROFILE AWS_PROFILE AWS_EB_PROFILE
|
unset AWS_DEFAULT_PROFILE AWS_PROFILE AWS_EB_PROFILE
|
||||||
echo AWS profile cleared.
|
echo AWS profile cleared.
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
#saml2aws login -a $1 -p $1
|
|
||||||
#eval $(saml2aws script -a $1 -p $1 --skip-prompt)
|
echo "Available profiles"
|
||||||
export AWS_DEFAULT_PROFILE=$1
|
grep profile ~/.aws/config|awk '{print $2}' | sed 's/]//g'
|
||||||
export AWS_PROFILE=$1
|
|
||||||
export AWS_EB_PROFILE=$1
|
|
||||||
|
|
Loading…
Reference in New Issue