stargazing/build-all

61 lines
1.8 KiB
Plaintext
Raw Normal View History

2022-09-23 13:21:45 -07:00
#!/usr/bin/env sh
2022-10-04 21:41:16 -07:00
yes_retrieve()
2022-09-23 15:55:45 -07:00
{ : \
2022-10-04 21:41:16 -07:00
&& local image="$1" ok=1 out= g= \
2022-09-23 15:55:45 -07:00
&& shift \
&& [ -d out ] \
&& out="$(realpath out)" \
&& for f in "$@" \
;do : \
2022-10-04 21:41:16 -07:00
&& g="out/${f##*/}" \
&& { ! [ -e "$g" ] || mv "$g" "$g~" ;} \
2022-09-23 15:55:45 -07:00
;done \
&& podman run -v="$out":/out --rm --entrypoint /bin/busybox "$image" \
cp -- "$@" "/out/" \
&& for f in "$@" \
;do : \
2022-10-04 21:41:16 -07:00
&& g="out/${f##*/}" \
2022-09-23 15:55:45 -07:00
&& if [ -e "$g" ] \
;then : \
2022-10-04 21:41:16 -07:00
&& { ! [ -e "$g~" ] || rm "$g~" ;} \
2022-09-23 15:55:45 -07:00
;else : \
&& printf '%s: %s\n' yes_retrieve "failed to copy file $f to $g" \
&& ok=0 \
;fi \
;done \
&& [ $ok = 1 ] \
2022-10-04 21:41:16 -07:00
;}
2022-09-23 13:21:45 -07:00
2022-10-04 21:41:16 -07:00
dbg_retrieve() { yes_retrieve "$1" "$2" && yes_retrieve "$1" "$2.dbg" ;}
2022-09-23 13:21:45 -07:00
: \
&& me="$(readlink -f "$0")" \
&& cd "${me%/*}" \
2022-09-23 13:30:01 -07:00
\
&& { [ -d out ] || mkdir out ;} \
2022-09-23 13:30:01 -07:00
\
&& podman build -t notwa-util notwa-util \
&& podman build -t cosmo cosmo \
&& podman build -t cosmo-kuroko cosmo-kuroko \
2022-10-04 04:55:39 -07:00
&& podman build -t cosmo-muon cosmo-muon \
2022-09-23 16:15:26 -07:00
&& podman build -t cosmo-perl cosmo-perl \
2022-09-23 14:15:54 -07:00
&& podman build -t cosmo-yices cosmo-yices \
2022-09-23 13:21:45 -07:00
\
2022-09-26 19:43:44 -07:00
&& yes_retrieve cosmo /cosmopolitan/bin/ape \
&& yes_retrieve cosmo /cosmopolitan/bin/awk.com \
&& yes_retrieve cosmo /cosmopolitan/bin/gzip.com \
&& yes_retrieve cosmo /cosmopolitan/bin/make.com \
&& yes_retrieve cosmo /cosmopolitan/bin/sed.com \
&& yes_retrieve cosmo /cosmopolitan/bin/unzip.com \
&& yes_retrieve cosmo /cosmopolitan/bin/zip.com \
2022-09-23 13:21:45 -07:00
&& dbg_retrieve cosmo-kuroko /bin/kuroko.com \
2022-10-04 04:55:39 -07:00
&& dbg_retrieve cosmo-muon /bin/muon.com \
2022-09-23 17:08:10 -07:00
&& dbg_retrieve cosmo-perl /bin/perl.com \
2022-09-23 14:15:54 -07:00
&& dbg_retrieve cosmo-yices /bin/kissat.com \
&& dbg_retrieve cosmo-yices /bin/yices-sat.com \
&& dbg_retrieve cosmo-yices /bin/yices-smt.com \
&& dbg_retrieve cosmo-yices /bin/yices-smt2.com \
&& dbg_retrieve cosmo-yices /bin/yices.com \
2022-09-23 13:21:45 -07:00
;