Skip to content

Commit

Permalink
ci: apply shfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Xenion1987 committed Jun 26, 2024
1 parent 031ea5a commit 26409de
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .devcontainer/scripts/post-create-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pre-commit install

# Add functions to source aws and openstack credentials
if [[ ! $(grep -qo source-aws-credentials ~/".${SHELL##*/}rc") == "source-aws-credentials" ]]; then
cat << _EOF >> ~/".${SHELL##*/}rc"
cat <<_EOF >>~/".${SHELL##*/}rc"
function source-aws-credentials() {
export AWS_DEFAULT_REGION=\$(awk -F' = ' '/region/ {print \$NF}' ~/.aws/config)
Expand All @@ -47,7 +47,7 @@ function source-aws-credentials() {
_EOF
fi
if [[ ! $(grep -qo source-openstack-credentials ~/".${SHELL##*/}rc") == "source-openstack-credentials" ]]; then
cat << _EOF >> ~/".${SHELL##*/}rc"
cat <<_EOF >>~/".${SHELL##*/}rc"
function source-openstack-credentials() {
. ~/.config/openstack/groupone-mcs-openstack.sh \\
Expand All @@ -56,7 +56,7 @@ function source-openstack-credentials() {
_EOF
fi
if ! grep -qo 'function sc' ~/".${SHELL##*/}rc"; then
cat << _EOF >> ~/".${SHELL##*/}rc"
cat <<_EOF >>~/".${SHELL##*/}rc"
# Source AWS and OS credentials and print them safely
function sc() {
Expand All @@ -75,7 +75,7 @@ function sc() {
_EOF
fi
if ! grep -qo 'function cc' ~/".${SHELL##*/}rc"; then
cat << _EOF >> ~/".${SHELL##*/}rc"
cat <<_EOF >>~/".${SHELL##*/}rc"
# Check environment for AWS and OS credentials and print them safely
function cc() {
Expand All @@ -89,15 +89,15 @@ function cc() {
_EOF
fi
if ! grep -qo 'eval sc' ~/".${SHELL##*/}rc"; then
cat << _EOF >> ~/".${SHELL##*/}rc"
cat <<_EOF >>~/".${SHELL##*/}rc"
eval sc
_EOF
fi

if command -v openstack &>/dev/null; then
if ! grep -qo 'openstack complete' ~/".${SHELL##*/}rc"; then
cat << _EOF >> ~/".${SHELL##*/}rc"
cat <<_EOF >>~/".${SHELL##*/}rc"
source <(openstack complete)
_EOF
Expand Down

0 comments on commit 26409de

Please sign in to comment.