Browse Source

bash function so switch aws environments

master
Markus Bergholz 1 year ago
parent
commit
4e6995ad2b
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      bash/mb.bashrc

+ 12
- 0
bash/mb.bashrc View File

@@ -166,6 +166,18 @@ function aur() {
fi
}

function awsenv() {

if (("$#" != 1)); then
cmp --silent ~/.aws/credentials ~/.aws/credentials.prod && echo "your're using PROD" || echo "you're using TEST"
elif [ "$1" = "prod" ]; then
cp ~/.aws/credentials.prod ~/.aws/credentials
elif [ "$1" = "test" ]; then
cp ~/.aws/credentials.test ~/.aws/credentials
fi

}

alias x11orwayland="loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Type"
alias hosts="grep 'Host ' ~/.ssh/config"
alias fail="tail -f"


Loading…
Cancel
Save