Browse Source

pdm scripts now should send error messages to stderr instead of stdout

feature/startup-from-labels
Mario Alegre 4 years ago
parent
commit
0611a3027b
  1. 6
      .install/bin/pdm-build
  2. 8
      .install/bin/pdm-launch
  3. 6
      .install/bin/pdm-shell

6
.install/bin/pdm-build

@ -9,9 +9,9 @@ epoch=$(date +%s.%3N)
today=$(date +%Y-%m-%d-T%H%M)
badarg() {
echo -n "$(basename $0): "
echo "$1"
echo "Try '$(basename $0) -h' for more information."
echo -n "$(basename $0): " >&2
echo "$1" >&2
echo "Try '$(basename $0) -h' for more information." >&2
exit 2
}

8
.install/bin/pdm-launch

@ -3,9 +3,9 @@
set -eEuo pipefail
badarg() {
echo -n "$(basename $0): "
echo "$1"
echo "Try '$(basename $0) -h' for more information."
echo -n "$(basename $0): " >&2
echo "$1" >&2
echo "Try '$(basename $0) -h' for more information." >&2
exit 2
}
@ -64,7 +64,7 @@ if [[ $opt_config -eq 1 ]]; then
echo "Getting deploy options from image metadata label '$opt_label' ..."
deployconf=$(podman image inspect -f "{{ .Config.Labels.${opt_label} }}" "$image")
if [[ $deployconf == "<no value>" ]]; then
echo "Error: could not find image metadata label '$opt_label'"
echo "Error: could not find image metadata label '$opt_label'" >&2
exit 1
fi
else

6
.install/bin/pdm-shell

@ -3,9 +3,9 @@
set -eEuo pipefail
badarg() {
echo -n "$(basename $0): "
echo "$1"
echo "Try '$(basename $0) -h' for more information."
echo -n "$(basename $0): " >&2
echo "$1" >&2
echo "Try '$(basename $0) -h' for more information." >&2
exit 2
}

Loading…
Cancel
Save