diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-07-25 17:19:08 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-07-25 17:19:08 +0200 |
commit | fb28c4fe687548541240894332ea75b4c4820167 (patch) | |
tree | 2cfcef85c0c17f0c4d12d3eea2d3bc5364f72db9 /checkrepo | |
parent | 8a4c67602c36f65f0b204a7e4ecfa18016c89803 (diff) | |
download | repo-tools-fb28c4fe687548541240894332ea75b4c4820167.tar.gz repo-tools-fb28c4fe687548541240894332ea75b4c4820167.tar.xz |
Use trap to cleanup
Diffstat (limited to 'checkrepo')
-rwxr-xr-x | checkrepo | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -7,6 +7,7 @@ tmp="$(mktemp -d)" [[ -f "${lock}" ]] && exit 1 touch "${lock}" +trap "rm -rf '${lock}' '${tmp}'" EXIT INT TERM echo ' BEGIN { @@ -49,6 +50,3 @@ done cat ${tmp}/md5sums-{i686,x86_64}.txt > ${tmp}/md5sums.txt md5sum -c --quiet ${tmp}/md5sums.txt - -rm -rf ${tmp} -rm -f "${lock}" |