Remove tmpdir when finished
svn path=/trunk/; revision=566
This commit is contained in:
parent
611f864053
commit
3061d4f53c
3 changed files with 14 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue