meta: add noisy messages to build script
This commit is contained in:
parent
67ec821336
commit
3dfea15904
1 changed files with 9 additions and 1 deletions
10
build-all
10
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" "$@" \
|
||||
;}
|
||||
|
||||
|
|
Loading…
Reference in a new issue