diff --git a/build-all b/build-all index 59f05ea..a14486b 100755 --- a/build-all +++ b/build-all @@ -1,10 +1,17 @@ #!/usr/bin/env sh +announce() { : \ + && printf >&2 ' \033[1m\033[7m <-- \033[0m\033[1m ' \ + && printf >&2 ' %30s %-30s ' "$1" "$2" \ + && printf >&2 ' \033[1m\033[7m --> \033[0m\n' \ + ;} + yes_retrieve() { : \ && local ok=1 out= g= image="${1?missing argument}" && shift \ && [ -d out ] && out="$(realpath out)" \ && for f in "$@" \ - ;do g="out/${f##*/}" && { ! [ -e "$g" ] || mv "$g" "$g~" ;} || return \ + ;do announce retrieving "$f" \ + && g="out/${f##*/}" && { ! [ -e "$g" ] || mv "$g" "$g~" ;} || return \ ;done \ && podman run -v="$out":/out --rm --entrypoint /bin/busybox "$image" \ cp -- "$@" "/out/" \ @@ -26,6 +33,7 @@ dbg_retrieve() { : \ build() { : \ && local t="${1?missing argument}" && shift \ + && announce building "$t" \ && podman build -t "$t" "$t" "$@" \ ;}