Thread (7 messages) flat view 7 messages, 2 authors, 2016-06-15
STALE3709d

[PATCH 09/16] t6000lib: tr portability fix

From: Jeff King <hidden>
Date: 2016-06-15 22:44:22
Subsystem: the rest · Maintainer: Linus Torvalds

Some versions of tr complain if the number of characters in
both sets isn't the same. So here we must manually expand
the dashes in set2.

Signed-off-by: Jeff King <redacted>
---
This almost makes me want to just use sed instead. But quoting that line
noise would probably make it less readable.

 t/t6000lib.sh |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/t/t6000lib.sh b/t/t6000lib.sh
index 180633e..b69f7c4 100755
--- a/t/t6000lib.sh
+++ b/t/t6000lib.sh
@@ -97,7 +97,10 @@ check_output()
 # from front and back.
 name_from_description()
 {
-        tr "'" '-' | tr '~`!@#$%^&*()_+={}[]|\;:"<>,/? ' '-' | tr -s '-' | tr '[A-Z]' '[a-z]' | sed "s/^-*//;s/-*\$//"
+        tr "'" '-' |
+		tr '~`!@#$%^&*()_+={}[]|\;:"<>,/? ' \
+		   '------------------------------' |
+		tr -s '-' | tr '[A-Z]' '[a-z]' | sed "s/^-*//;s/-*\$//"
 }
 
 
-- 
1.5.4.4.543.g30fdd.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help