diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2017-09-21 10:08:57 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2017-09-21 10:08:57 -0700 |
commit | 1901386f0a179aa18cfdb789207643019320563c (patch) | |
tree | 5b5904faed691eca2056031eddfa531021759c3c /snapshots-create.sh | |
parent | snapshots-create.sh: reduce padding on tarball (diff) | |
download | mastermirror-scripts-1901386f0a179aa18cfdb789207643019320563c.tar.gz mastermirror-scripts-1901386f0a179aa18cfdb789207643019320563c.tar.bz2 mastermirror-scripts-1901386f0a179aa18cfdb789207643019320563c.zip |
snapshots-create.sh: hoist exclusion list creation to new script, remember to cleanup
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'snapshots-create.sh')
-rwxr-xr-x | snapshots-create.sh | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/snapshots-create.sh b/snapshots-create.sh index 44efdf4..1344da6 100755 --- a/snapshots-create.sh +++ b/snapshots-create.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2011-2015 Gentoo Foundation; Distributed under the GPL v2 +# Copyright 2011-2017 Gentoo Foundation; Distributed under the GPL v2 # might be earlier copyright, no history available # 1) Create the tarball @@ -86,27 +86,8 @@ cd ${TEMP} write_time_log "START TARBALL $(date -u)" if [ ! -f "${FILENAME%.bz2}" ]; then # Build exclusion list - # app-bar/ChangeLog is a valid package name, so we have to be careful about it! EXCLUSION_LIST="$(mktemp -p ${TEMP} snapshot-exclude.XXXXXXXXXX)" - find "${MASTER}" \ - \( \ - -type f \ - -regextype posix-egrep \ - \( \ - -path "${MASTER}/eclass/ChangeLog*" -o \ - -path "${MASTER}/profiles/ChangeLog*" -o \ - -path "${MASTER}/profiles/*/ChangeLog*" -o \ - -regex "${MASTER}/[^/]+/[^/]+/ChangeLog(-[0-9]+)?$" \ - \) \ - \) \ - -o \ - -name '.checksum-test-marker' \ - \ - | sed "s,${MASTER}/*,,g" \ - \ - | sort \ - \ - >"${EXCLUSION_LIST}" + "$(dirname $0)"/print-exclusion-list "${MASTER}" >"${EXCLUSION_LIST}" TAR_OPTIONS=( # Force a small block size @@ -150,6 +131,7 @@ if [ ! -f "${FILENAME%.bz2}" ]; then echo "Tar run failed!" exit 1 fi + rm -f "${EXCLUSION_LIST}" fi [ ! -f " ${FILENAME}.umd5sum" ] && md5sum ${FILENAME%.bz2} > ${FILENAME}.umd5sum [ ! -f "${FILENAME%.bz2}.bz2" ] && ${NICE} $BZIP2_PROG -k9 ${FILENAME%.bz2} |