Porting dash to OpenBSD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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.
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

Powered by Linux