Messages in this thread Patch in this message | | | Subject | [TRIVIAL] avoid "expr length" (improved version) | From | Rusty Russell <> | Date | Tue, 23 Mar 2004 10:53:43 +1100 |
| |
From: Martin Schaffner <maschaffner@gmx.ch>
--- I improved my patch to avoid the "expr length" GNU-ism. It should be much clearer now. It uses "wc -c" to count the letters. Thanks, Martin
--- trivial-2.6.5-rc2-bk2/Makefile.orig 2004-03-23 10:11:35.000000000 +1100 +++ trivial-2.6.5-rc2-bk2/Makefile 2004-03-23 10:11:35.000000000 +1100 @@ -652,7 +652,7 @@ uts_len := 64 define filechk_version.h - if expr length "$(KERNELRELEASE)" \> $(uts_len) >/dev/null ; then \ + if ((`echo -n "$(KERNELRELEASE)" | wc -c ` > $(uts_len))); then \ echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \ exit 1; \ fi; \ -- What is this? http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/ Don't blame me: the Monkey is driving File: Martin Schaffner <maschaffner@gmx.ch>: [PATCH] avoid "expr length" (improved version) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |