summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsyncrepo3
1 files changed, 1 insertions, 2 deletions
diff --git a/syncrepo b/syncrepo
index 1803b8c..f8975ff 100755
--- a/syncrepo
+++ b/syncrepo
@@ -9,6 +9,7 @@ repos='core,extra,testing,community,community-testing'
[ ! -d "${target}" ] && exit 1
[ -f "${lock}" ] && exit 1
touch "${lock}"
+trap "rm -f '${lock}'" EXIT INT TERM
rsync -rptlv --safe-links --delete --progress -h \
--include='*/' \
@@ -25,5 +26,3 @@ rsync -rptlv --safe-links --delete --progress -h \
--exclude='lastsync' \
${source}/{${repos}} \
"${target}"
-
-rm -f "${lock}"