Fix abra app ls
for app → type
This commit is contained in:
parent
6ba2657dc1
commit
d6b4a4744f
6
abra
6
abra
@ -555,7 +555,7 @@ sub_app_list (){
|
|||||||
for i in "${!ENV_FILES[@]}"; do
|
for i in "${!ENV_FILES[@]}"; do
|
||||||
# Output header inside the loop, so it's included in the pipe to `column`
|
# Output header inside the loop, so it's included in the pipe to `column`
|
||||||
if [ "$i" == 0 ]; then
|
if [ "$i" == 0 ]; then
|
||||||
printf " DOMAIN\tAPP\tSERVER%s%s\n" "${STATUS:+ }" "${STATUS:+STATUS}"
|
printf " DOMAIN\tTYPE\tSERVER%s%s\n" "${STATUS:+ }" "${STATUS:+STATUS}"
|
||||||
printf " --\t--\t--%s\n" "${STATUS:+ --}"
|
printf " --\t--\t--%s\n" "${STATUS:+ --}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -569,7 +569,7 @@ sub_app_list (){
|
|||||||
|
|
||||||
set -a
|
set -a
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
APP="$(source "$ENV_FILE" && echo "$APP")"
|
TYPE="$(source "$ENV_FILE" && echo "$TYPE")"
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
APP_STACK_NAME="$(source "$ENV_FILE" && echo "$STACK_NAME")"
|
APP_STACK_NAME="$(source "$ENV_FILE" && echo "$STACK_NAME")"
|
||||||
set +a
|
set +a
|
||||||
@ -580,7 +580,7 @@ sub_app_list (){
|
|||||||
if [ -n "$STATUS" ]; then
|
if [ -n "$STATUS" ]; then
|
||||||
APP_STATUS=$( printf '%s\n' "${DEPLOYED_APPS[@]}" | grep -qP "^${SERVER}~${APP_STACK_NAME}$" && echo "deployed" || echo "inactive")
|
APP_STATUS=$( printf '%s\n' "${DEPLOYED_APPS[@]}" | grep -qP "^${SERVER}~${APP_STACK_NAME}$" && echo "deployed" || echo "inactive")
|
||||||
fi
|
fi
|
||||||
printf " %s\t%s\t%s%s\n" "$DOMAIN" "$APP" "$SERVER" "${STATUS:+ }${APP_STATUS}"
|
printf " %s\t%s\t%s%s\n" "$DOMAIN" "$TYPE" "$SERVER" "${STATUS:+ }${APP_STATUS}"
|
||||||
done | column -s' ' -t
|
done | column -s' ' -t
|
||||||
# Align table `-t` based on tab characters -s`^V<Tab>`
|
# Align table `-t` based on tab characters -s`^V<Tab>`
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user