simplify rescue shell

This commit is contained in:
Connor Olding 2022-10-14 19:25:31 -07:00
parent 558dd00561
commit 624e05b247
25 changed files with 29 additions and 66 deletions

View File

@ -59,6 +59,7 @@ build_simple() { : \
&& build cosmo-awk \
&& build cosmo-dist \
&& build cosmo-sed \
&& build rescue \
`# phase 4` \
&& build cosmo-base \
&& build_simple \

View File

@ -81,6 +81,8 @@ RUN --mount=type=tmpfs,target=/tmp : \
b//mkdir.com b//package.com b//pwd.com \
b//rm.com b//touch.com b//unbundle.com \
b//zipobj.com \
# install the newly-built ape loader, just in case it has changed: \
&& ./expand install -m0755 a//ape.elf /usr/bin/ape \
;
# optionally use the newly-built bootstrapped binaries to build themselves again.

4
rescue/Dockerfile Normal file
View File

@ -0,0 +1,4 @@
FROM scratch
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-bootstrap /usr/bin/ape /bin/ape
ENTRYPOINT ["/bin/busybox"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/assimilate.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/assimilate.com"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/bd.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/bd.com"]

View File

@ -1,6 +1,4 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/bing.* /bin/
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/unbing.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/bing.com"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/blinkenlights.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/blinkenlights.com"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/chibicc.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/chibicc.com"]

View File

@ -1,6 +1,4 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/lua.* /bin/
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/luac.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/lua.com"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/make.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/make.com"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/python.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/python.com"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/sqlite3.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/sqlite3.com"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/fold.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/fold.com"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/greenbean.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/greenbean.com"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/life.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/life.com"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/memzoom.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/memzoom.com"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/mkdeps.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/mkdeps.com"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/pledge.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/pledge.com"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/printimage.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/printimage.com"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/printvideo.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/printvideo.com"]

View File

@ -1,6 +1,4 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/qjs.* /bin/
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/qjsc.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/qjs.com"]

View File

@ -1,6 +1,4 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/redbean-demo.* /bin/
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/redbean-original.* /bin/
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/redbean-static.* /bin/

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/tinyemu.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/tinyemu.com"]

View File

@ -1,5 +1,3 @@
FROM scratch AS runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/unbourne.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/unbourne.com"]

View File

@ -1,5 +1,3 @@
FROM scratch as runner
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/cosmo-all /cosmopolitan/build/bootstrap/ape.elf /bin/ape
FROM rescue
COPY --chmod=0755 --from=localhost/cosmo-all /usr/local/bin/unveil.* /bin/
ENTRYPOINT ["/bin/ape", "/bin/unveil.com"]