test: install busybox symlinks with relative path

Then it works to run the applets from outside the unshare.  Useful for
testing and test development.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2023-02-28 00:48:25 +01:00
parent a4af9ba248
commit b396a018c5
+8 -1
View File
@@ -40,7 +40,14 @@ libs = $(foreach path,$(_libs_src),$(abspath $(DEST))$(path))
all: $(libs) $(DEST)/bin/$(BBBIN)
@(cd $(DEST); \
for prg in `./bin/$(BBBIN) --list-full`; do \
ln -sf /bin/$(BBBIN) $$prg; \
case $$prg in \
usr/bin/* | usr/sbin/*) \
ln -sf ../../bin/$(BBBIN) $$prg;; \
bin/* | sbin/*) \
ln -sf ../bin/$(BBBIN) $$prg;; \
*) \
ln -sf bin/$(BBBIN) $$prg;; \
esac; \
done)
$(DEST)/bin/$(BBBIN).sha256: