hang_processes.sh: Fix some ShellCheck warnings
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 26 Feb 2019 16:43:07 +0000 (11:43 -0500)
committerJonathan Rajotte Julien <jonathan.rajotte-julien@efficios.com>
Tue, 26 Feb 2019 16:51:57 +0000 (11:51 -0500)
commitd4069651b64d3446f6d3e8c11b8583204a7508f4
tree8d8133709c6d1f78d45e3e2fe8cc45e5171ea727
parent6b95a7b49da0c3f874fa9db0cbe75252677104ee
hang_processes.sh: Fix some ShellCheck warnings

Specifically:

In hang_processes.sh line 29:
if [ ! -z "$lttng_processes" ]; then
     ^-- SC2236: Use -n instead of ! -z.

In hang_processes.sh line 54:
if [ ! -z "$core_files" ]; then
     ^-- SC2236: Use -n instead of ! -z.

In hang_processes.sh line 67:
    rm -rf $core_files
           ^---------^ SC2086: Double quote to prevent globbing and word splitting.

I also removed the -r on the rm.  Since we are not deleting directories (and it
seems safer not to use -rf if we don't need to, in case $core_files contains
the wrong thing).

Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
scripts/lttng-tools/hang_processes.sh
This page took 0.022977 seconds and 4 git commands to generate.