diff --git a/CHANGELOG.md b/CHANGELOG.md index f7949b2a..ecff73fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ Please ADD ALL Changes to the UNRELEASED SECTION and not a specific release - Replace raw echo with output helpers in db/dbenv - Replace raw echo with output helpers in db/dbappsettings - Replace raw echo with output helpers in db/createmssqldb +- Replace raw echo with standard output helpers (die/info/success) in db/create-deploy-script ### Changed - Replace raw echo with standard output helpers (die/info/success) in github/cancel-workflows - Replace raw echo with standard output helpers (die/info/success) in git/update-repos-personal diff --git a/db/create-deploy-script b/db/create-deploy-script index 898f88f9..76b480bf 100755 --- a/db/create-deploy-script +++ b/db/create-deploy-script @@ -1,11 +1,30 @@ #!/bin/sh die() { - echo - echo "$@" + if [ -t 2 ]; then + printf '\n\033[31m✗\033[0m %s\n' "$*" >&2 + else + printf '\n✗ %s\n' "$*" >&2 + fi exit 1 } +success() { + if [ -t 1 ]; then + printf '\n\033[32m✓\033[0m %s\n' "$*" + else + printf '\n✓ %s\n' "$*" + fi +} + +info() { + if [ -t 1 ]; then + printf '\n\033[32m→\033[0m %s\n' "$*" + else + printf '\n→ %s\n' "$*" + fi +} + SOURCE= OUTPUT= REPORT=