From d44528a346fda4e7b7d89bc06dabca93f891e177 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sat, 15 Oct 2022 01:09:21 -0700 Subject: [PATCH] defer building assimilate, awk, sed, and unbourne to cosmo-all --- build-all | 5 +++-- cosmo-base/Dockerfile | 3 +++ cosmo-bootstrap/Dockerfile | 3 +-- cosmo-dist/Dockerfile | 15 +++++++-------- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/build-all b/build-all index a1e9379..1df6b95 100755 --- a/build-all +++ b/build-all @@ -50,8 +50,9 @@ build() { : \ && build cosmo-perl \ && build cosmo-yices \ \ - && bin=/cosmopolitan/bin \ - && yes_retrieve cosmo-base $bin/ape $bin/awk.com $bin/gzip.com $bin/make.com \ + && yes_retrieve cosmo-base /cosmopolitan/bin/ape \ + && bin=/usr/local/bin \ + && dbg_retrieve cosmo-all $bin/awk.com $bin/gzip.com $bin/make.com \ $bin/sed.com $bin/unbourne.com $bin/unzip.com $bin/zip.com \ && dbg_retrieve cosmo-kuroko /bin/kuroko.com \ && dbg_retrieve cosmo-muon /bin/muon.com \ diff --git a/cosmo-base/Dockerfile b/cosmo-base/Dockerfile index a6a2d92..3047d82 100644 --- a/cosmo-base/Dockerfile +++ b/cosmo-base/Dockerfile @@ -1 +1,4 @@ FROM cosmo-dist +COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/assimilate.com /cosmopolitan/bin/ +COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/awk.com /cosmopolitan/bin/ +COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/sed.com /cosmopolitan/bin/ diff --git a/cosmo-bootstrap/Dockerfile b/cosmo-bootstrap/Dockerfile index 600ea25..e3eb25d 100644 --- a/cosmo-bootstrap/Dockerfile +++ b/cosmo-bootstrap/Dockerfile @@ -110,6 +110,5 @@ RUN --mount=type=tmpfs,target=/tmp : \ # these are essential too! \ RUN --mount=type=tmpfs,target=/tmp : \ && ./expand ./makeit \ - e//unbourne.com t//awk/awk.com t//sed/sed.com \ - t//unzip/unzip.com t//zip/zip.com b//assimilate.com \ + t//unzip/unzip.com t//zip/zip.com \ ; diff --git a/cosmo-dist/Dockerfile b/cosmo-dist/Dockerfile index 71aadaf..94b59e8 100644 --- a/cosmo-dist/Dockerfile +++ b/cosmo-dist/Dockerfile @@ -36,14 +36,13 @@ RUN --mount=type=tmpfs,target=/tmp : \ # discover .com files by uncommenting this command: \ #&& find o -name '*.com' ! -type d -exec printf '%s\n' cp -t /tmp/bin {} + | sort && exit 1 \ && ./expand cp -t /tmp/bin \ - e//unbourne.com t//awk/awk.com t//make/make.com \ - t//sed/sed.com t//unzip/unzip.com t//zip/zip.com \ - b//ar.com b//assimilate.com b//cocmd.com \ - b//compile.com b//cp.com b//echo.com \ - b//fixupobj.com b//gzip.com b//mkdeps.com \ - b//mkdir.com b//package.com b//pwd.com \ - b//rm.com b//rollup.com b//symtab.com \ - b//touch.com b//unbundle.com b//zipobj.com \ + t//make/make.com t//unzip/unzip.com t//zip/zip.com \ + b//ar.com b//cocmd.com b//compile.com \ + b//cp.com b//echo.com b//fixupobj.com \ + b//gzip.com b//mkdeps.com b//mkdir.com \ + b//package.com b//pwd.com b//rm.com \ + b//rollup.com b//symtab.com b//touch.com \ + b//unbundle.com b//zipobj.com \ && dedupe /tmp/bin /distrib/bin/ \ #&& ln -s "../dist/$flavor/ape.elf" /distrib/bin/ape \ && cp "dist/$flavor/ape.elf" /distrib/bin/ape \