[PATCH 09/16] t6000lib: tr portability fix
- From
Jeff King <peff@peff.net>
- Date
- Mar 12, 2008, 21:38 UTC
- Message-ID
- <20080312213831.GJ26286@coredump.intra.peff.net>
- In-Reply-To
- <cover.1205356737.git.peff@peff.net>
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 <peff@peff.net> --- 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