summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-06-26 12:33:45 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-06-26 12:33:45 (EDT)
commit8008dc934ac51b68a231dc79460ee657b06fdc21 (patch)
treeb910c371c936a3e98d5587eb047e25359441f592
parentf0a8453dff5c7a372fc44e1c6d5f3c675eda89b3 (diff)
Automatically wrap /etc/motd at 72 characters.
-rwxr-xr-xbuild6
-rw-r--r--src/etc/motd10
2 files changed, 10 insertions, 6 deletions
diff --git a/build b/build
index 7709692..ef72cfd 100755
--- a/build
+++ b/build
@@ -26,7 +26,11 @@ install: build
ln -s /run base-files.data/var/run
ln -s /run/lock base-files.data/var/lock
# Install base files.
- for file in /etc/issue /etc/motd; do \
+ set -e; \
+ sed ':l; N; $$!bl; s/\([^\n]\)\n\([^\n]\)/\1 \2/g' src/etc/motd | \
+ sed "$(script)" | fold -s -w 72 >base-files.data/etc/motd
+ set -e; \
+ for file in /etc/issue; do \
sed "$(script)" "src/$${file}" >"base-files.data/$${file}"; \
done
printf '%s\n' '$(OPK_HOST_ARCH)' >'base-files.data/etc/proteanos_arch'
diff --git a/src/etc/motd b/src/etc/motd
index 910759f..fafa60e 100644
--- a/src/etc/motd
+++ b/src/etc/motd
@@ -1,7 +1,7 @@
-The programs included with @DISTRIBUTION@ @OS@ are free
-software; the exact distribution terms for each program are described in
-the individual files in /usr/share/doc/*/copyright.
+The programs included with @DISTRIBUTION@ @OS@ are free software; the
+exact distribution terms for each program are described in the
+individual files in /usr/share/doc/*/copyright.
-@DISTRIBUTION@ @OS@ comes with ABSOLUTELY NO WARRANTY, to the
-extent permitted by applicable law.
+@DISTRIBUTION@ @OS@ comes with ABSOLUTELY NO WARRANTY, to the extent
+permitted by applicable law.