-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common: patch txt2man in Docker images
Patch txt2man with: mvertes/txt2man#18 to fix the following bug: mvertes/txt2man#21
Showing
4 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# Copyright 2020, Intel Corporation | ||
# | ||
|
||
# | ||
# patch-txt2man.sh - patch txt2man to fix the following bug: | ||
# https://github.com/mvertes/txt2man/issues/21 | ||
# | ||
|
||
set -e | ||
|
||
FILE=$(which txt2man) | ||
|
||
if [ "$FILE" == "" ]; then | ||
echo "Error: txt2man not found" | ||
exit 1 | ||
fi | ||
|
||
echo "Patching $FILE ..." | ||
cp $FILE . | ||
# apply the patch: https://github.com/mvertes/txt2man/pull/18 | ||
patch < ./txt2man.patch | ||
sudo mv ./txt2man $FILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From 4cd9ba2cea5b54d472bd00f41ee0d38ef7497521 Mon Sep 17 00:00:00 2001 | ||
From: Jorge Luis Martinez Gomez <[email protected]> | ||
Date: Tue, 17 Sep 2019 23:23:58 -0700 | ||
Subject: [PATCH] remove redundant escapes causing gawk warnings | ||
|
||
--- | ||
txt2man | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/txt2man b/txt2man | ||
index 64d0a4c..abc1c43 100755 | ||
--- a/txt2man | ||
+++ b/txt2man | ||
@@ -242,7 +242,7 @@ BEGIN { | ||
pnzls = ls | ||
match($0, /[^ ]/) | ||
ls = RSTART | ||
- if (pls == 0 && pnzls > 0 && ls > pnzls && $1 !~ /^[0-9\-\*\o]\.*$/) { | ||
+ if (pls == 0 && pnzls > 0 && ls > pnzls && $1 !~ /^[0-9\-\*o]\.*$/) { | ||
# example display block | ||
if (prevblankline == 1) { | ||
print ".PP" | ||
@@ -300,7 +300,7 @@ section == "SYNOPSIS" { | ||
} else if ($1 == "#define") | ||
subwords["\\<" $2 "\\>"] = "\\fI" $2 "\\fP" | ||
for (i = 1; i <= NF; i++) { | ||
- if ($i ~ /[\,\)]\;*$/) { | ||
+ if ($i ~ /[,\)];*$/) { | ||
a = $i | ||
sub(/.*\(/, "", a) | ||
gsub(/\W/, "", a) | ||
-- | ||
2.26.2 | ||
|