gcc_release: Substitute dates in snapshot-README and snapshot-index.html files rather than...

* gcc_release: Substitute dates in snapshot-README and
	snapshot-index.html files rather than directly using the old files
	on the FTP site.  Set QMAILHOST.

From-SVN: r49619
This commit is contained in:
Joseph Myers 2002-02-08 17:56:12 +00:00 committed by Joseph Myers
parent 694d53ee5f
commit 236930f5d7
2 changed files with 13 additions and 9 deletions

View File

@ -1,3 +1,9 @@
2002-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
* gcc_release: Substitute dates in snapshot-README and
snapshot-index.html files rather than directly using the old files
on the FTP site. Set QMAILHOST.
2002-02-08 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* snapshot-index.html: Improve markup.

View File

@ -521,7 +521,6 @@ else
# was.
if [ $LOCAL -ne 0 ]; then
LAST_DATE=`cat ~/.snapshot_date`
PREV_LAST_DATE=`cat ~/.prev_snapshot_date`
LAST_LONG_DATE=`date --date=$LAST_DATE +%Y-%m-%d`
LAST_DIR=~ftp/pub/gcc/snapshots/${LAST_LONG_DATE}
OLD_TARS=${LAST_DIR}/gcc-${LAST_DATE}.tar.gz
@ -588,15 +587,14 @@ if [ $MODE_UPLOAD -ne 0 ]; then
if [ $SNAPSHOT -ne 0 ] && [ $LOCAL -ne 0 ]; then
# Update links on the FTP server.
TEXT_DATE=`date --date=$DATE +%B\ %d,\ %Y`
LAST_TEXT_DATE=`date --date=$LAST_DATE +%B\ %d,\ %Y`
cd ~ftp/pub/gcc/snapshots
sed -e "s%$LAST_DATE%$DATE%g" -e "s%$PREV_LAST_DATE%$LAST_DATE%g" \
-e "s%$LAST_LONG_DATE%$LONG_DATE%g" \
-e "s%$LAST_TEXT_DATE%$TEXT_DATE%g" < 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-README > $$
mv $$ README
sed -e "s%$LAST_DATE%$DATE%g" -e "s%$PREV_LAST_DATE%$LAST_DATE%g" \
-e "s%$LAST_LONG_DATE%$LONG_DATE%g" \
-e "s%$LAST_TEXT_DATE%$TEXT_DATE%g" < index.html > $$
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
@ -604,7 +602,6 @@ if [ $MODE_UPLOAD -ne 0 ]; then
# Update snapshot date file.
changedir ~
mv .snapshot_date .prev_snapshot_date
echo $DATE >.snapshot_date
# Update gcc_latest_snapshot tag.
@ -612,6 +609,7 @@ if [ $MODE_UPLOAD -ne 0 ]; then
${CVS} rtag -rgcc_ss_${DATE} gcc_latest_snapshot gcc
# 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