File 0106-scripts-Make-run-dialyzer-slightly-more-portable.patch of Package erlang
From 306af66cdff406b2b46d83757675caef15e35604 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20H=C3=B6gberg?= <john@erlang.org>
Date: Tue, 18 May 2021 10:39:54 +0200
Subject: [PATCH] scripts: Make run-dialyzer slightly more portable
This makes it work out of the box on Big Sur.
---
scripts/run-dialyzer | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/run-dialyzer b/scripts/run-dialyzer
index e50bf16998..cad04a3514 100755
--- a/scripts/run-dialyzer
+++ b/scripts/run-dialyzer
@@ -16,7 +16,7 @@ if [ "X$ERL_TOP" != "X" ] && [ -d $ERL_TOP/lib ]; then
else
LIB_DIR=$(erl -noshell -eval 'io:format("~ts~n",[code:lib_dir()])' -s init stop)
fi
-ALL_APPLICATIONS=$(ls -d -1 $LIB_DIR/*/ | sed "s:^$LIB_DIR/\\([^/\-]\+\\).*$:\1:g")
+ALL_APPLICATIONS=$(ls -d -1 $LIB_DIR/*/ | sed "s:^$LIB_DIR/::g" | sed "s:/$::g")
ALL_APPLICATIONS="erts $ALL_APPLICATIONS"
echo "All applications: $ALL_APPLICATIONS" |tr '\n' ' ' && echo ""
@@ -44,7 +44,7 @@ if [ -f $ERL_TOP/bin/dialyzer ]; then
DIALYZER=$ERL_TOP/bin/dialyzer
fi
-PLT=$(mktemp --suffix=.plt)
+PLT="$(mktemp).plt"
set -x
--
2.26.2