Jenkins
We use the WORKSPACE variable, which is normally set by Jenkins.
To allow testing the script by hand, set it manually to the current
working directory if it is not defined.
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
file_list=$(mktemp)
ret=0
+# WORKSPACE is normally set by Jenkins. Use the current directory otherwise,
+# like when testing this script manually.
+WORKSPACE=${WORKSPACE:-$PWD}
+
lttng_processes="$("$PGREP" -l 'lttng|gen-ust-.+')" || true
if [ ! -z "$lttng_processes" ]; then
done
done
+ mkdir -p "${WORKSPACE}/build"
tar cfzh "${WORKSPACE}/build/core.tar.gz" -T "$file_list"
rm -rf $core_files
ret=1