prereq: add support for creating relative symlinks

For targets that install symlinks, like coreutils,
if the links happen to be deleted, let prereq stage
be capable of creating them again with a relative path.

Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Michael Pratt 2024-10-03 00:49:10 -04:00 committed by Robert Marko
parent 90262c6f6e
commit 660e398f92
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ define SetupHostCommand
[ -x "$(STAGING_DIR_HOST)/bin/$(strip $(1))" ] && exit 0 \
;; \
esac; \
ln -sf "$$$$$$$$bin" "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \
ln -sf "$$$$$$$${bin#$(STAGING_DIR_HOST)/bin/}" "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \
exit 1; \
fi; \
fi; \