summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/xmlstarlet/files/0001-usage2c.awk-fix-wrong-basename-regexp.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/xmlstarlet/files/0001-usage2c.awk-fix-wrong-basename-regexp.patch')
-rw-r--r--meta-oe/recipes-support/xmlstarlet/files/0001-usage2c.awk-fix-wrong-basename-regexp.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/xmlstarlet/files/0001-usage2c.awk-fix-wrong-basename-regexp.patch b/meta-oe/recipes-support/xmlstarlet/files/0001-usage2c.awk-fix-wrong-basename-regexp.patch
new file mode 100644
index 000000000..24b187f2a
--- /dev/null
+++ b/meta-oe/recipes-support/xmlstarlet/files/0001-usage2c.awk-fix-wrong-basename-regexp.patch
@@ -0,0 +1,37 @@
1Upstream-Status: Submitted [sourceforge]
2
3From 75d789d0ea9716c9a9ae72f42a2fcfa907cf4a12 Mon Sep 17 00:00:00 2001
4From: Matthieu Crapet <mcrapet@gmail.com>
5Date: Mon, 30 Jun 2014 13:52:25 +0200
6Subject: [PATCH] usage2c.awk: fix wrong basename regexp
7
8Previously not matching with filename argument with absolute path.
9
10Signed-off-by: Matthieu Crapet <mcrapet@gmail.com>
11---
12 usage2c.awk | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/usage2c.awk b/usage2c.awk
16index 94b897a..9aea212 100755
17--- a/usage2c.awk
18+++ b/usage2c.awk
19@@ -6,13 +6,13 @@ BEGIN {
20 }
21
22 # text in src/foo-bar.txt results in
23-# static const char foo_text[] = {
24+# static const char foo_bar[] = {
25 # 't', 'h', 'e', ' ', 't', 'e', 'x', 't', ...
26 # }
27 length(command_name) == 0 {
28 command_name = FILENAME;
29 sub(/\.txt$/, "", command_name);
30- sub(/^([^\/]+\/)*/, "", command_name);
31+ sub(/^.*\//, "", command_name);
32 gsub(/-/, "_", command_name);
33 printf("static const char %s[] = {\n", command_name);
34 progs = 0;
35--
362.0.0
37