announce everything
This commit is contained in:
parent
690355395c
commit
8da9cbd0fc
1 changed files with 8 additions and 7 deletions
15
build-all
15
build-all
|
@ -1,10 +1,17 @@
|
||||||
#!/usr/bin/env sh
|
#!/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() { : \
|
yes_retrieve() { : \
|
||||||
&& local ok=1 out= g= image="${1?missing argument}" && shift \
|
&& local ok=1 out= g= image="${1?missing argument}" && shift \
|
||||||
&& [ -d out ] && out="$(realpath out)" \
|
&& [ -d out ] && out="$(realpath out)" \
|
||||||
&& for f in "$@" \
|
&& 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 \
|
;done \
|
||||||
&& podman run -v="$out":/out --rm --entrypoint /bin/busybox "$image" \
|
&& podman run -v="$out":/out --rm --entrypoint /bin/busybox "$image" \
|
||||||
cp -- "$@" "/out/" \
|
cp -- "$@" "/out/" \
|
||||||
|
@ -24,12 +31,6 @@ dbg_retrieve() { : \
|
||||||
&& yes_retrieve "$container" "$@" \
|
&& yes_retrieve "$container" "$@" \
|
||||||
;}
|
;}
|
||||||
|
|
||||||
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' \
|
|
||||||
;}
|
|
||||||
|
|
||||||
build() { : \
|
build() { : \
|
||||||
&& local t="${1?missing argument}" && shift \
|
&& local t="${1?missing argument}" && shift \
|
||||||
&& announce building "$t" \
|
&& announce building "$t" \
|
||||||
|
|
Loading…
Add table
Reference in a new issue