aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2019-12-09 15:33:21 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2019-12-09 15:33:21 -0800
commitd6b0a3c078002fc6dcc99c7ed36b175d94358015 (patch)
tree60091ef1fc8c029b779d3ebce1f75d7e89261455
parentsnapshots_create: handle alternate previous snapshots (diff)
downloadmastermirror-scripts-20191209T233345Z.tar.gz
mastermirror-scripts-20191209T233345Z.tar.bz2
mastermirror-scripts-20191209T233345Z.zip
snapshots-create.sh: fix gentoo*umd5sum20191209T233345Z
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-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)