Skip to content

Commit b96889f

Browse files
shellcheck linter: use bash extras/devel-tools/print-backtrace.sh
This commit changes the shell to #!/usr/bin/env bash. This series aim to reduce the shellcheck logs. Signed-off-by: Thales Antunes de Oliveira Barretto <[email protected]>
1 parent 56e21c4 commit b96889f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extras/devel-tools/print-backtrace.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function Usage()
3535
debuginfo_rpm=$1
3636
backtrace_file=$2
3737

38-
if [ ! "$debuginfo_rpm" ] || [ ! "$backtrace_file" ]; then
38+
if [ -z "$debuginfo_rpm" ] || [ -z "$backtrace_file" ]; then
3939
Usage
4040
exit 1
4141
fi
@@ -104,7 +104,7 @@ do
104104
if [ ! -f "$libpath" ]; then
105105
continue
106106
fi
107-
newbt=( $(eu-addr2line --functions --exe="$libpath" "$addr") )
107+
mapfile -t newbt < <(eu-addr2line --functions --exe="$libpath" "$addr")
108108
echo "$bt ${newbt[*]}"
109109
done <"$backtrace_file"
110110

0 commit comments

Comments
 (0)