Skip to content

Commit

Permalink
shfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru committed Feb 15, 2022
1 parent 072239a commit ff6ead5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
6 changes: 3 additions & 3 deletions rootfs/etc/profile.d/_40-preferences.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ fi

if [[ ! -d $GEODESIC_CONFIG_HOME ]]; then
if ! df -a | grep -q " ${GEODESIC_LOCALHOST:-/localhost}\$"; then
if [[ -z $KUBERNETES_PORT ]]; then
if [[ -n $KUBERNETES_PORT ]]; then
echo $(green Kubernetes host detected, Geodesic customization disabled.)
else
red "########################################################################################" >&2
red "# No filesystem is mounted at $(bold ${GEODESIC_LOCALHOST:-/localhost}) which limits Geodesic functionality." >&2
boot install
else
echo $(green Kubernetes host detected, Geodesic customization disabled.)
fi
export GEODESIC_CUSTOMIZATION_DISABLED="/localhost not a volume"
elif mkdir -p $GEODESIC_CONFIG_HOME; then
Expand Down
4 changes: 2 additions & 2 deletions rootfs/etc/profile.d/aws-okta.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

if [ "${AWS_OKTA_ENABLED}" == "true" ]; then
echo
echo
echo
red '* You have AWS_OKTA_ENABLED set to "true".'
red '* Cloud Posse no longer recommends using aws-okta and is'
Expand Down Expand Up @@ -35,7 +35,7 @@ if [ "${AWS_OKTA_ENABLED}" == "true" ]; then

PROMPT_HOOKS+=("aws_okta_prompt")
function aws_okta_prompt() {
if [[ -z "${AWS_OKTA_PROFILE}" && -z "${ASSUME_ROLE}" ]]; then
if [[ -z "${AWS_OKTA_PROFILE}" && -z "${ASSUME_ROLE}" ]]; then
echo -e "-> Run '$(green assume-role)' to login to AWS with aws-okta"
fi
}
Expand Down
6 changes: 3 additions & 3 deletions rootfs/etc/profile.d/aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ fi

function aws_choose_role() {
_preview="${FZF_PREVIEW:-crudini --format=ini --get "$AWS_CONFIG_FILE" 'profile {}'}"
cat "${AWS_SHARED_CREDENTIALS_FILE:-~/.aws/credentials}" "${AWS_CONFIG_FILE:-~/.aws/config}" 2>/dev/null | \
crudini --get - | sed 's/^ *profile *//' | \
cat "${AWS_SHARED_CREDENTIALS_FILE:-~/.aws/credentials}" "${AWS_CONFIG_FILE:-~/.aws/config}" 2>/dev/null |
crudini --get - | sed 's/^ *profile *//' |
fzf \
--height 30% \
--preview-window right:70% \
Expand Down Expand Up @@ -67,7 +67,7 @@ function aws_sdk_assume_role() {
else
AWS_PROFILE="$role" $*
fi
ASSUME_ROLE="$assume_role";
ASSUME_ROLE="$assume_role"
}

# Asks AWS what the currently active identity is and
Expand Down
3 changes: 0 additions & 3 deletions rootfs/etc/profile.d/iterm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,3 @@ if [ "${TERM_PROGRAM}" == "iTerm.app" ]; then
trap _geodesic_iterm_exit EXIT
fi
fi



6 changes: 3 additions & 3 deletions rootfs/etc/profile.d/prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ function geodesic_prompt() {
# See https://github.com/cloudposse/geodesic/issues/417
[[ -z $ASSUME_ROLE_ACTIVE_MARK ]] && ASSUME_ROLE_ACTIVE_MARK=$'\x01'$(tput bold)$(tput setaf 2)$'\x02\u221a\x01'$(tput sgr0)$'\x02' # green bold '√'
[[ -z $ASSUME_ROLE_INACTIVE_MARK ]] && ASSUME_ROLE_INACTIVE_MARK=$'\x01'$(tput bold)$(tput setaf 1)$'\x02\u2717\x01'$(tput sgr0)$'\x02' # red bold '✗'
[[ -z $BLACK_RIGHTWARDS_ARROWHEAD ]] && BLACK_RIGHTWARDS_ARROWHEAD=$'\u27A4' # '➤'
[[ -z $BANNER_MARK ]] && BANNER_MARK='' # \u29c9 TWO JOINED SQUARES
[[ -z $BLACK_RIGHTWARDS_ARROWHEAD ]] && BLACK_RIGHTWARDS_ARROWHEAD=$'\u27A4' # '➤'
[[ -z $BANNER_MARK ]] && BANNER_MARK='' # \u29c9 TWO JOINED SQUARES
;;

*)
Expand All @@ -102,7 +102,7 @@ function geodesic_prompt() {
# '▶︎' ($'\u25b6\ufe0e') BLACK RIGHT-POINTING TRIANGLE which is sometimes presented as an emoji (as GitHub likes to) '▶️'
# '⏩︎' ($'\u23e9\ufe0e') BLACK RIGHT-POINTING DOUBLE TRIANGLE
[[ -z $BLACK_RIGHTWARDS_ARROWHEAD ]] && BLACK_RIGHTWARDS_ARROWHEAD=$'\u2a20' # '⨠' Z NOTATION SCHEMA PIPING
[[ -z $BANNER_MARK ]] && BANNER_MARK='' # \u29c9 TWO JOINED SQUARES
[[ -z $BANNER_MARK ]] && BANNER_MARK='' # \u29c9 TWO JOINED SQUARES
;;
esac

Expand Down

0 comments on commit ff6ead5

Please sign in to comment.