Skip to content

Commit

Permalink
link dest: /usr/bin
Browse files Browse the repository at this point in the history
  • Loading branch information
sam#gemmi-win10 committed Nov 4, 2023
1 parent 833ac57 commit aac0d08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions compile/build-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,16 @@ COPY --from=xrdp ${STATIC} /rootfs${STATIC}
COPY --from=dropbear ${STATIC} /rootfs${STATIC}
COPY --from=suckless ${STATIC} /rootfs${STATIC}

# clear lib,share/man; create links
RUN rm -rf /rootfs/bin /rootfs/sbin; mkdir -p /rootfs/bin /rootfs/sbin; \
# clear lib,share/man; create links: (ubt/deb: bin> /usr/bin)
RUN rm -rf /rootfs/usr/bin /rootfs/usr/sbin; mkdir -p /rootfs/usr/bin /rootfs/usr/sbin; \
find /rootfs/usr/local/static -type d |egrep "/share/man$|xrdp/lib$" | \
while read one; do du -sh $one; rm -rf $one; done; \
\
find /rootfs/usr/local/static -type f |grep "/sbin/" |sort | \
while read one; do ls -lh $one; one2=$(echo $one|sed "s^/rootfs^^g"); ln -s $one2 /rootfs/sbin/; done; \
while read one; do ls -lh $one; one2=$(echo $one|sed "s^/rootfs^^g"); ln -s $one2 /rootfs/usr/sbin/; done; \
\
find /rootfs/usr/local/static -type f |grep "/bin/" |sort | \
while read one; do ls -lh $one; one2=$(echo $one|sed "s^/rootfs^^g"); ln -s $one2 /rootfs/bin/; done;
while read one; do ls -lh $one; one2=$(echo $one|sed "s^/rootfs^^g"); ln -s $one2 /rootfs/usr/bin/; done;
# keeplist, outDir;
# ..
# upx
Expand Down

0 comments on commit aac0d08

Please sign in to comment.