summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-11-04 04:00:34 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-11-04 04:00:34 (EST)
commit1558d05c62ed90f7d93a14533541c33896b7b733 (patch)
treedb862d6353e7b60208364596434e8900176b4e33 /build
parente37f03311d934a8f33a9ff31db47b18bbf0be555 (diff)
update-alternatives all the things
Diffstat (limited to 'build')
-rwxr-xr-xbuild11
1 files changed, 4 insertions, 7 deletions
diff --git a/build b/build
index a41ce87..ffa7a20 100755
--- a/build
+++ b/build
@@ -35,13 +35,10 @@ install: build
chmod u+s dest/bin/busybox
mkdir -p dest/usr/share/busybox
set -e; exec 3>dest/usr/share/busybox/alternatives; \
- while read link name prio; do \
- if [ -e "dest/$${link}" ]; then \
- mv "dest/$${link}" "dest/$${link}.busybox"; \
- printf '%s %s %s\n' "$${link}" "$${name}" "$${prio}" \
- >&3; \
- fi; \
- done <../alternatives; \
+ for f in dest/bin/* dest/sbin/* dest/usr/bin/* dest/usr/sbin/*; do \
+ mv "$${f}" "$${f}.busybox"; \
+ printf '%s\n' "$${f#dest}" >&3; \
+ done; \
exec 3>&-
set -e; $(config_enabled); $(install_init_script); \
if config_enabled INIT; then \