Remove tmpdir when finished

svn path=/trunk/; revision=566
This commit is contained in:
Andrew Gaffney 2008-09-04 02:07:52 +00:00
parent 611f864053
commit 3061d4f53c
3 changed files with 14 additions and 3 deletions

View file

@ -2,6 +2,10 @@
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Id$
04 Sep 2008; Andrew Gaffney <agaffney@gentoo.org> catalyst-auto,
catalyst-auto.conf:
Remove tmpdir when finished
04 Sep 2008; Andrew Gaffney <agaffney@gentoo.org> catalyst-auto:
Add code to modify copied specs and create snapshot

View file

@ -40,6 +40,7 @@ run_cmd() {
# ${cmd} 2>&1 | tee ${logfile}
else
# ${cmd} &> ${logfile}
a=1
fi
}
@ -125,12 +126,12 @@ for i in $(find -name '*.spec'); do
sed -i 's|^version_stamp:.*$|version_stamp: '${DATESTAMP}'|' ${i}
sed -i 's|^snapshot:.*$|snapshot: '${DATESTAMP}'|' ${i}
if [ "${old_version_stamp}" = "${old_source_subpath}" ]; then
sed -i 's|^source_subpath: (.\+-).\+$|source_subpath: \1'${DATESTAMP}'|'
sed -i 's|^source_subpath: \(.\+-\).\+$|source_subpath: \1'${DATESTAMP}'|' ${i}
fi
done
# Create snapshot
if ! run_cmd "catalyst -c ${CATALYST_CONFIG} -s ${DATESTAMP}" ${TMPDIR}/log/snapshot-${DATESTAMP}.log"; then
if ! run_cmd "catalyst -c ${CATALYST_CONFIG} -s ${DATESTAMP}" "${TMPDIR}/log/snapshot-${DATESTAMP}.log"; then
send_email "Catalyst build error - snapshot" "$(tail -n 200 ${TMPDIR}/log/snapshot-${DATESTAMP}.log)"
fi
@ -144,3 +145,8 @@ for i in $(ls -1 ${SPECS}); do
done
send_email "Catalyst build success" "Everything finished successfully."
if ! rm -rf "${TMPDIR}"; then
echo "Could not remove tmpdir ${TMPDIR}!"
exit 1
fi

View file

@ -2,7 +2,8 @@
# self-explanatory.
SPECS_DIR=/release/svn-releng/trunk/releases/2008.0/specs/amd64
SPECS='*.spec'
SPECS="stage[123].spec installcd-stage[12]*.spec"
SPECS="${SPECS} stage[23]-desktop.spec livecd-stage[12]*.spec"
#EMAIL_TO=releng@gentoo.org
EMAIL_TO=andrew@gentoo.org