diff --git a/scripts/print-image-name b/scripts/print-image-name deleted file mode 100755 index 2131325..0000000 --- a/scripts/print-image-name +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -set -euo pipefail - -echo-stderr() { - local message="$*" - printf "%s\n" "$message" 1>&2 -} - - -throw() { - local message="$*" - echo-stderr "error: $message" - false -} - - -usage() { - cat - 1>&2 <<-EOS -usage: print-image-name < path/to/Dockerfile - -OPTIONS - -h, --help print this usage -EOS -} - - -usage-error() { - local message="$*" - echo-stderr "$message" - usage - false -} - - -main() { - cat - | grep -F '# image-name:' | head -1 | sed 's/# *image-name: *\(.*\)/\1/' -} - - -case "$*" in - --help | -h) - usage - false ;; - *) - main "$@" ;; -esac