From: Mike Korbakov <mike-kmv@yandex.ru>
To: dash@vger.kernel.org
Subject: Porting dash to OpenBSD
Date: Sun, 26 Jun 2011 06:18:59 +0400 [thread overview]
Message-ID: <223511309054739@web103.yandex.ru> (raw)
Hello!
Unfortunatly, not all systems (like OpenBSD) has built-in texttools like nl,
that makes it difficult to port dash, with minimum troubles.
To reduce dependencies, I suggest using instead of nl other tools like awk or cat
(as advised openbsd porters team).
Building dash-0.5.6.1 was successfull with this patch:
--- src/mkbuiltins.orig Sat Jun 5 13:34:23 2010
+++ src/mkbuiltins Sun Jun 26 02:36:23 2011
@@ -84,7 +84,7 @@ cat <<\!
*/
!
-sed 's/ -[a-z]*//' $temp2 | nl -v 0 | LC_COLLATE=C sort -u -k 3,3 |
+sed 's/ -[a-z]*//' $temp2 | awk '{ print " " FNR-1 " " $0 }' | LC_COLLATE=C sort -u -k 3,3 |
tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |
awk '{ printf "#define %s (builtincmd + %d)\n", $3, $1}'
printf '\n#define NUMBUILTINS %d\n' $(wc -l < $temp2)
Would you make these changes in future releases?
Best regards,
Mike Korbakov.
next reply other threads:[~2011-06-26 2:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-26 2:18 Mike Korbakov [this message]
2011-07-03 20:54 ` Porting dash to OpenBSD Jilles Tjoelker
2011-07-08 8:58 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=223511309054739@web103.yandex.ru \
--to=mike-kmv@yandex.ru \
--cc=dash@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.