Skip to content

Instantly share code, notes, and snippets.

@penk
Last active April 10, 2019 05:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save penk/8879641 to your computer and use it in GitHub Desktop.
Save penk/8879641 to your computer and use it in GitHub Desktop.
SlateKit Base makefile
all:
for i in `find rootfs/ -type f`; do \
if [ "$$i" = "rootfs//lib64/ld-linux-x86-64.so.2" ]; then continue; \
else \
for j in `ldd $$i | cut -d \( -f1 | cut -d \> -f2 | sed 's/[ \t]*//g'`; do \
if [ ! "$$j" = "notadynamicexecutable" ] && [ ! "$$j" = "staticallylinked" ]; then \
mkdir -p rootfs/`dirname $$j`; \
cp -v -rfpL --remove-destination $$j rootfs/$$j; fi; \
done; \
fi \
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment