checkapk: remove temporary dir on SIGINT and exit

This commit is contained in:
Sören Tempel 2018-09-24 17:34:31 +02:00 committed by Natanael Copa
parent 51830efbb5
commit 015f0f69a8
1 changed files with 1 additions and 2 deletions

View File

@ -47,6 +47,7 @@ fi
startdir="$PWD"
tmpdir=$(mktemp -d -t checkpkg-script.XXXXXX)
trap "rm -rf '$tmpdir'" INT EXIT
cd "$tmpdir" || die "failed to create temp dir"
for i in $pkgname $subpackages; do
@ -91,5 +92,3 @@ for i in $pkgname $subpackages; do
msg "No soname differences for $_pkgname."
fi
done
msg "Files saved to $tmpdir"