diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-06-06 11:58:39 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-06-06 11:58:39 (EDT) |
commit | 687e367310f40973076cce912d3a6210baf87268 (patch) | |
tree | 3efbe52828f7d52a49752f9fba5a24356d4df04f | |
parent | d5f2fae645faea95c161e2685cf21d7d60dcbca6 (diff) |
build: Replace install commands with $(INSTALL) function
install is non-standard and awkward at best. Without the -t option, the
destination is assumed to be a non-directory file, even when it isn't
(e.g. when a trailing "/" is used). BusyBox install didn't get a -t
option until version 1.23.0.
-rwxr-xr-x | build | 25 |
1 files changed, 17 insertions, 8 deletions
@@ -10,6 +10,15 @@ tables = \ southamerica \ etcetera +INSTALL = set -e; \ + INSTALL() { \ + i=0; for d in "$${@}"; do : $$((i += 1)); done; \ + mkdir -pv "$${d}"; \ + for s in "$${@}"; do [ $$((i -= 1)) -eq 0 ] && break; \ + cp -v "$${s}" "$${d}"; \ + done; \ + }; INSTALL + nop: @: @@ -18,15 +27,15 @@ build: touch $@ install: build - install -D src/tzselect tzselect.data/usr/bin - install -D src/zdump zdump.data/usr/bin - install -D src/zic zic.data/usr/sbin - install -D src/tzfile.5 tzdata-doc.data/usr/share/man/man5 - install -D src/tzselect.8 tzdata-doc.data/usr/share/man/man8 - install -D src/zdump.8 tzdata-doc.data/usr/share/man/man8 - install -D src/zic.8 tzdata-doc.data/usr/share/man/man8 + $(INSTALL) src/tzselect tzselect.data/usr/bin + $(INSTALL) src/zdump zdump.data/usr/bin + $(INSTALL) src/zic zic.data/usr/sbin + $(INSTALL) src/tzfile.5 tzdata-doc.data/usr/share/man/man5 + $(INSTALL) src/tzselect.8 tzdata-doc.data/usr/share/man/man8 + $(INSTALL) src/zdump.8 tzdata-doc.data/usr/share/man/man8 + $(INSTALL) src/zic.8 tzdata-doc.data/usr/share/man/man8 # Install country and zone tables used by tzselect. - install -D src/*.tab tzdata.data/usr/share/zoneinfo + $(INSTALL) src/*.tab tzdata.data/usr/share/zoneinfo # Install the Factory zone and make it the default localtime. src/zic -d tzdata.data/usr/share/zoneinfo src/factory mkdir -p tzdata.data/etc |