summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsnapshots-create.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/snapshots-create.sh b/snapshots-create.sh
index 30b6522..fb6c661 100755
--- a/snapshots-create.sh
+++ b/snapshots-create.sh
@@ -258,7 +258,7 @@ write_time_log "END COMPRESS $(date -u)"
write_time_log "START SIGN $(date -u)"
for f in "${FILENAME}" "${FILENAME%.*}".xz "${FILENAME_NEW}"; do
if [ ! -f "${UPLOAD}${f}".umd5sum ]; then
- cp "${FILENAME}".umd5sum "${UPLOAD}${f}".umd5sum || exit $?
+ cp "${f}".umd5sum "${UPLOAD}${f}".umd5sum || exit $?
md5sum "$f" > "$f".md5sum || exit $?
fi
if [ ! -f "$f".gpgsig ]; then
@@ -281,7 +281,6 @@ if [ ! -f "${PATCH}" ]; then
md5sum ${PATCH} > ${PATCH}.md5sum
chmod 644 ${PATCH}{,.md5sum}
mv ${PATCH}{,.md5sum} ${DELTA_UPLOAD}
- rm orig ${FILENAME%.bz2} "${FILENAME}".umd5sum || exit $?
fi
write_time_log "END DELTA $(date -u)"
# end 5)
@@ -310,6 +309,13 @@ write_time_log "END SYMLINK $(date -u)"
# 7) tidy up
write_time_log "START CLEANUP $(date -u)"
+cd "${TEMP}"
+rm -f orig \
+ ${FILENAME%.bz2} \
+ ${FILENAME_NEW%.xz} \
+ "${FILENAME}".umd5sum \
+ "${FILENAME_NEW}".umd5sum \
+ || exit $?
/usr/bin/find ${UPLOAD} -maxdepth 1 -mtime +${HISTORY} -type f | /usr/bin/xargs /bin/rm -f
write_time_log "END CLEANUP $(date -u)"
# end 7)