Add removal of temporary folders

The PS adds improvals to debug-report.sh script. Added removal of
temporary folders after creation of an archive with information
needed for debuging purposes.

Change-Id: I44c842779386271a8ab1c4332710e2ddaeb5b14e
This commit is contained in:
Kabanov, Dmitrii (dk370c) 2019-05-06 19:43:25 -07:00
parent 648e016154
commit b01bf1da22
1 changed files with 3 additions and 1 deletions

View File

@ -126,5 +126,7 @@ fi
wait
tar zcf "${SUBDIR_NAME}.tgz" -C "${TEMP_DIR}" "${SUBDIR_NAME}"
if tar zcf "${SUBDIR_NAME}.tgz" -C "${TEMP_DIR}" "${SUBDIR_NAME}"; then
find "${BASETEMP}" -type d -name "${SUBDIR_NAME}" -prune -exec sh -c 'rm -rf $(dirname "$1")' _ {} \;
fi
echo "Report collected in $TEMP_DIR/${SUBDIR_NAME}.tgz"