util: create a shortcut path to /usr/local/bin

This commit is contained in:
Connor Olding 2022-10-01 11:02:27 -07:00
parent c5d5b03b25
commit e3ca67c7b3
6 changed files with 10 additions and 10 deletions

View File

@ -28,4 +28,3 @@ remove elements from this list as you see fit.
* util: handle `-shared` in cosmocc (i.e. warn about it)
* util: include the "pretty" version of dedupe.awk instead of the golfed version
* util: use cache for `apk` packages
* util: create a shortcut path to `/usr/local/bin`

View File

@ -22,7 +22,7 @@ FROM localhost/cosmo AS builder
COPY --from=downloader /kuroko /kuroko
WORKDIR /kuroko
COPY --chmod=0755 --from=localhost/notwa-util /usr/local/bin/shed /usr/bin/
COPY --chmod=0755 --from=localhost/notwa-util /nu/shed /usr/bin/
RUN : \
&& cp -r . ../kuroko.orig \
\
@ -120,7 +120,7 @@ int main(int argc, char * argv[]) {\n\
'
RUN tar zxf /cosmopolitan/dist/headers.tar.gz -C /cosmopolitan
COPY --chmod=0755 --from=localhost/notwa-util /usr/local/bin/cosmocc /usr/bin/
COPY --chmod=0755 --from=localhost/notwa-util /nu/cosmocc /usr/bin/
RUN : \
&& CC=cosmocc CFLAGS="-Os -g" AR=ar.com ARFLAGS=rcsD \
make.com kuroko modules/codecs/sbencs.krk modules/codecs/dbdata.krk \
@ -131,7 +131,7 @@ RUN : \
RUN make.com test
FROM scratch AS runner
COPY --chmod=0755 --from=localhost/notwa-util /usr/local/bin/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=builder /cosmopolitan/bin/ape /bin/ape
COPY --chmod=0755 --from=builder /kuroko/kuroko.com /kuroko/kuroko.com.dbg /bin/
COPY --from=builder /kuroko.patch /var/local/kuroko.patch

View File

@ -75,7 +75,7 @@ RUN : \
WORKDIR perl
COPY --chmod=0755 --from=localhost/notwa-util /usr/local/bin/shed /usr/bin/
COPY --chmod=0755 --from=localhost/notwa-util /nu/shed /usr/bin/
RUN : \
&& shed hints/cosmo.sh '/x86_64-linux-musl/d' \
&& shed Makefile.SH 's/.*-musl-objcopy/\tobjcopy/g' \
@ -135,7 +135,7 @@ RUN : \
;
FROM scratch AS runner
COPY --chmod=0755 --from=localhost/notwa-util /usr/local/bin/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=builder /cosmopolitan/bin/ape /bin/ape
COPY --chmod=0755 --from=builder /perl/cosmo/o/perl.com /bin/perl.com
COPY --chmod=0755 --from=builder /perl/perl.elf /bin/perl.com.dbg

View File

@ -49,7 +49,7 @@ RUN : \
&& cd /cosmopolitan \
&& tar zxf dist/headers.tar.gz \
;
COPY --chmod=0755 --from=localhost/notwa-util /usr/local/bin/cosmocc /usr/local/bin/quickconf /usr/local/bin/shed /usr/bin/
COPY --chmod=0755 --from=localhost/notwa-util /nu/cosmocc /nu/quickconf /nu/shed /usr/bin/
COPY --from=downloader /kissat /kissat
WORKDIR /kissat
@ -122,7 +122,7 @@ RUN : \
;
FROM scratch AS runner
COPY --chmod=0755 --from=localhost/notwa-util /usr/local/bin/busybox /bin/busybox
COPY --chmod=0755 --from=localhost/notwa-util /nu/busybox /bin/busybox
COPY --chmod=0755 --from=builder /cosmopolitan/dist/def/ape.elf /bin/ape
COPY --from=builder /yices/config.cache /yices/config.log /yices/config.status /var/local/
COPY --from=builder /yices/dist/bin /bin

View File

@ -29,7 +29,7 @@ WORKDIR /cosmopolitan
# tell makefiles to be less noisy, also use /tmp:
ENV V=0 COLUMNS=80 TMPDIR=/tmp
COPY --chmod=0755 --from=localhost/notwa-util /usr/local/bin/shed /usr/bin/
COPY --chmod=0755 --from=localhost/notwa-util /nu/shed /usr/bin/
RUN : \
# allow optimized builds to be more portable, so the container is too. \
&& shed build/config.mk 's/-march=native/-march=haswell -mno-pclmul -mtune=generic/' \
@ -132,7 +132,7 @@ RUN . ./env \
;
FROM builder AS distrib
COPY --chmod=0755 --from=localhost/notwa-util /usr/local/bin/dedupe /usr/bin/
COPY --chmod=0755 --from=localhost/notwa-util /nu/dedupe /usr/bin/
RUN --mount=type=tmpfs,target=/tmp : \
&& . ./env \
&& find o -name '*.sym' -delete \

View File

@ -5,6 +5,7 @@ FROM alpine:3.16 as partial
RUN apk add --no-cache xz
COPY --chmod=0755 acquire cosmocc dedupe quickconf shed \
/usr/local/bin/
RUN ln -s /usr/local/bin /nu
FROM partial as downloader
# this demonstrates how to use the `acquire` script.