ShellCheck points out a number of warnings in the example scripts. In
particular, a number of normal and special shell variables are not
quoted correctly.
Signed-off-by: Omair Majid <omajid@redhat.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
# launch with: run-clock-override progname args
-DIR=$(dirname $0)
-DIR=$(readlink -f $DIR)
+DIR=$(dirname "$0")
+DIR=$(readlink -f "$DIR")
-LTTNG_UST_CLOCK_PLUGIN="$DIR/lttng-ust-clock-override-example.so" ${*}
+LTTNG_UST_CLOCK_PLUGIN="$DIR/lttng-ust-clock-override-example.so" "${@}"
#!/bin/sh
-DIR=$(dirname $0)
-DIR=$(readlink -f $DIR)
+DIR=$(dirname "$0")
+DIR=$(readlink -f "$DIR")
-LD_PRELOAD=$DIR/lttng-ust-provider-ust-tests-demo.so:$DIR/lttng-ust-provider-ust-tests-demo3.so $DIR/demo ${*}
+LD_PRELOAD="$DIR/lttng-ust-provider-ust-tests-demo.so:$DIR/lttng-ust-provider-ust-tests-demo3.so" "$DIR/demo" "${@}"
# launch with: run-getcpu-override progname args
-DIR=$(dirname $0)
-DIR=$(readlink -f $DIR)
+DIR=$(dirname "$0")
+DIR=$(readlink -f "$DIR")
-LTTNG_UST_GETCPU_PLUGIN="$DIR/lttng-ust-getcpu-override-example.so" ${*}
+LTTNG_UST_GETCPU_PLUGIN="$DIR/lttng-ust-getcpu-override-example.so" "${@}"