gcc_release: Factor the updating of links and READMEs on the FTP server and sending mail for...
* gcc_release: Factor the updating of links and READMEs on the FTP server and sending mail for snapshots into a... (announce_snapshot): ...new function. Add informative output for both. From-SVN: r68473
This commit is contained in:
parent
380e198464
commit
b348a598a8
|
@ -1,3 +1,10 @@
|
|||
2003-06-25 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
|
||||
|
||||
* gcc_release: Factor the updating of links and READMEs on the
|
||||
FTP server and sending mail for snapshots into a...
|
||||
(announce_snapshot): ...new function.
|
||||
Add informative output for both.
|
||||
|
||||
2003-06-18 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
|
||||
|
||||
* gcc_release: Do not update gcc_latest_snapshot tag any longer.
|
||||
|
|
|
@ -336,7 +336,6 @@ build_diff() {
|
|||
}
|
||||
|
||||
# Upload the files to the FTP server.
|
||||
|
||||
upload_files() {
|
||||
inform "Uploading files"
|
||||
|
||||
|
@ -372,6 +371,30 @@ upload_files() {
|
|||
done
|
||||
}
|
||||
|
||||
# Announce a snapshot, both on the web and via mail.
|
||||
announce_snapshot() {
|
||||
inform "Updating links and READMEs on the FTP server"
|
||||
|
||||
TEXT_DATE=`date --date=$DATE +%B\ %d,\ %Y`
|
||||
cd ~ftp/pub/gcc/snapshots
|
||||
sed -e "s%@DATE@%$DATE%g" -e "s%@LAST_DATE@%$LAST_DATE%g" \
|
||||
-e "s%@LONG_DATE@%$LONG_DATE%g" \
|
||||
-e "s%@TEXT_DATE@%$TEXT_DATE%g" < ~/scripts/snapshot-README > $$
|
||||
mv $$ README
|
||||
sed -e "s%@DATE@%$DATE%g" -e "s%@LAST_DATE@%$LAST_DATE%g" \
|
||||
-e "s%@LONG_DATE@%$LONG_DATE%g" \
|
||||
-e "s%@TEXT_DATE@%$TEXT_DATE%g" < ~/scripts/snapshot-index.html > $$
|
||||
mv $$ index.html
|
||||
|
||||
touch LATEST-IS-$LONG_DATE
|
||||
rm -f LATEST-IS-$LAST_LONG_DATE
|
||||
|
||||
inform "Sending mail"
|
||||
|
||||
export QMAILHOST=gcc.gnu.org
|
||||
mail -s "gcc-ss-$DATE is now available" gcc@gcc.gnu.org < ~ftp/pub/gcc/snapshots/README
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# Initialization
|
||||
########################################################################
|
||||
|
@ -629,29 +652,12 @@ if [ $MODE_UPLOAD -ne 0 ]; then
|
|||
|
||||
# For snapshots, make some further updates.
|
||||
if [ $SNAPSHOT -ne 0 ] && [ $LOCAL -ne 0 ]; then
|
||||
# Update links on the FTP server.
|
||||
TEXT_DATE=`date --date=$DATE +%B\ %d,\ %Y`
|
||||
cd ~ftp/pub/gcc/snapshots
|
||||
sed -e "s%@DATE@%$DATE%g" -e "s%@LAST_DATE@%$LAST_DATE%g" \
|
||||
-e "s%@LONG_DATE@%$LONG_DATE%g" \
|
||||
-e "s%@TEXT_DATE@%$TEXT_DATE%g" < ~/scripts/snapshot-README > $$
|
||||
mv $$ README
|
||||
sed -e "s%@DATE@%$DATE%g" -e "s%@LAST_DATE@%$LAST_DATE%g" \
|
||||
-e "s%@LONG_DATE@%$LONG_DATE%g" \
|
||||
-e "s%@TEXT_DATE@%$TEXT_DATE%g" < ~/scripts/snapshot-index.html > $$
|
||||
mv $$ index.html
|
||||
|
||||
touch LATEST-IS-$LONG_DATE
|
||||
rm -f LATEST-IS-$LAST_LONG_DATE
|
||||
announce_snapshot
|
||||
|
||||
# Update snapshot date file.
|
||||
changedir ~
|
||||
echo $DATE >.snapshot_date
|
||||
|
||||
# Announce the snapshot.
|
||||
export QMAILHOST=gcc.gnu.org
|
||||
mail -s "gcc-ss-$DATE is now available" gcc@gcc.gnu.org < ~ftp/pub/gcc/snapshots/README
|
||||
|
||||
# Remove working directory
|
||||
rm -rf ${WORKING_DIRECTORY}
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue