From 069b203617ca643b94122e41d34699c4f2ef949e Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 7 Feb 2025 14:40:50 -0500 Subject: tests: Don't shell out to tr just to replace slashes with dashes --- tests/color.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tests/color.sh') diff --git a/tests/color.sh b/tests/color.sh index 8447824..9e2e0f6 100644 --- a/tests/color.sh +++ b/tests/color.sh @@ -46,9 +46,7 @@ show_bar() { # Name the pipe deterministically based on the ttyname, so that concurrent # tests.sh runs on the same terminal (e.g. make -jN check) cooperate - local pipe - pipe=$(printf '%s' "$TTY" | tr '/' '-') - pipe="${TMPDIR:-/tmp}/bfs$pipe.bar" + local pipe="${TMPDIR:-/tmp}/bfs${TTY//\//-}.bar" if mkfifo "$pipe" 2>/dev/null; then # We won the race, create the background process to manage the bar -- cgit v1.2.3