aboutsummaryrefslogtreecommitdiff
path: root/maintainer-scripts
diff options
context:
space:
mode:
authorGerald Pfeifer <pfeifer@dbai.tuwien.ac.at>2003-06-25 11:36:19 +0200
committerGerald Pfeifer <gerald@gcc.gnu.org>2003-06-25 09:36:19 +0000
commitb348a598a808ac5ad34eb3b7bb518d9af32d0f91 (patch)
tree7764ad34577caf769a8364e021b4f9f8fb4be597 /maintainer-scripts
parent380e198464b8fdf03634c2444fdd68a37e788ccc (diff)
downloadgcc-b348a598a808ac5ad34eb3b7bb518d9af32d0f91.zip
gcc-b348a598a808ac5ad34eb3b7bb518d9af32d0f91.tar.gz
gcc-b348a598a808ac5ad34eb3b7bb518d9af32d0f91.tar.bz2
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
Diffstat (limited to 'maintainer-scripts')
-rw-r--r--maintainer-scripts/ChangeLog7
-rwxr-xr-xmaintainer-scripts/gcc_release44
2 files changed, 32 insertions, 19 deletions
diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog
index 6f8132c..f897e22 100644
--- a/maintainer-scripts/ChangeLog
+++ b/maintainer-scripts/ChangeLog
@@ -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.
diff --git a/maintainer-scripts/gcc_release b/maintainer-scripts/gcc_release
index 5c714f5..41fb7fe 100755
--- a/maintainer-scripts/gcc_release
+++ b/maintainer-scripts/gcc_release
@@ -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