summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcheckrepo4
-rwxr-xr-xcreatelinks4
2 files changed, 2 insertions, 6 deletions
diff --git a/checkrepo b/checkrepo
index ddce82a..b88f7c1 100755
--- a/checkrepo
+++ b/checkrepo
@@ -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}"
diff --git a/createlinks b/createlinks
index defc0b8..fe1ff6f 100755
--- a/createlinks
+++ b/createlinks
@@ -9,6 +9,7 @@ tmp="$(mktemp -d)"
[ -f "${lock}" ] && exit 1
touch "${lock}"
+trap "rm -rf '${lock}' '${tmp}'" EXIT INT TERM
renice +10 -p $$ > /dev/null
@@ -63,6 +64,3 @@ for repo in ${repos[@]}; do
fi
done
done
-
-rm -rf ${tmp}
-rm -f "${lock}"