Commit b8f93352 by Mark Mitchell Committed by Mark Mitchell

gcc_release: Correct handling of diff-generation.

	* gcc_release: Correct handling of diff-generation.  Add
	"diffs" major mode.

[[Split portion of a mixed commit.]]

From-SVN: r49951.2
parent 87b3cd76
2002-02-21 Mark Mitchell <mark@codesourcery.com>
* gcc_release: Correct handling of diff-generation. Add
"diffs" major mode.
2002-02-08 Joseph S. Myers <jsm28@cam.ac.uk> 2002-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
* gcc_release: Substitute dates in snapshot-README and * gcc_release: Substitute dates in snapshot-README and
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# Contents: # Contents:
# Script to create a GCC release. # Script to create a GCC release.
# #
# Copyright (c) 2001 Free Software Foundation. # Copyright (c) 2001, 2002 Free Software Foundation.
# #
# This file is part of GNU CC. # This file is part of GNU CC.
# #
...@@ -284,13 +284,6 @@ build_tarfiles() { ...@@ -284,13 +284,6 @@ build_tarfiles() {
build_tarfile gcc-core-${RELEASE} ${EXCLUDES} \ build_tarfile gcc-core-${RELEASE} ${EXCLUDES} \
`basename ${SOURCE_DIRECTORY}` `basename ${SOURCE_DIRECTORY}`
# Possibly build diffs.
if [ -n "$OLD_TARS" ]; then
for old_tar in $OLD_TARS; do
build_diffs $old_tar
done
fi
# Build .bz2 files. # Build .bz2 files.
for f in ${FILE_LIST}; do for f in ${FILE_LIST}; do
bzfile=${f%.gz}.bz2 bzfile=${f%.gz}.bz2
...@@ -301,7 +294,7 @@ build_tarfiles() { ...@@ -301,7 +294,7 @@ build_tarfiles() {
# Build diffs against an old release. # Build diffs against an old release.
build_diffs() { build_diffs() {
old_dir=${1%/*} old_dir=${1%/}
old_file=${1##*/} old_file=${1##*/}
old_vers=${old_file%.tar.gz} old_vers=${old_file%.tar.gz}
old_vers=${old_vers#gcc-} old_vers=${old_vers#gcc-}
...@@ -346,7 +339,8 @@ upload_files() { ...@@ -346,7 +339,8 @@ upload_files() {
|| error "Could not create \`${FTP_PATH}'" || error "Could not create \`${FTP_PATH}'"
fi fi
# Copy the tar files to the FTP server. # Make sure the directory exists on the server.
${SSH} -l ${GCC_USERNAME} ${GCC_HOSTNAME} mkdir ${FTP_PATH}
for x in gcc*.gz gcc*.bz2; do for x in gcc*.gz gcc*.bz2; do
if [ -e ${x} ]; then if [ -e ${x} ]; then
# Make sure the file will be readable on the server. # Make sure the file will be readable on the server.
...@@ -375,8 +369,12 @@ CVS_PROTOCOL="ext" ...@@ -375,8 +369,12 @@ CVS_PROTOCOL="ext"
# The username to use when connecting to the server. # The username to use when connecting to the server.
CVS_USERNAME="${USER}" CVS_USERNAME="${USER}"
# The path to the directory where the files are uploaded for FTP. # The machine to which files will be uploaded.
FTP_PATH="gccadmin@gcc.gnu.org:~ftp/pub/gcc" GCC_HOSTNAME="gcc.gnu.org"
# The name of the account on the machine to which files are uploaded.
GCC_USERNAME="gccadmin"
# The directory in which the files will be placed.
FTP_PATH="~ftp/pub/gcc"
# The major number for the release. For release `3.0.2' this would be # The major number for the release. For release `3.0.2' this would be
# `3' # `3'
...@@ -429,6 +427,7 @@ SNAPSHOT=0 ...@@ -429,6 +427,7 @@ SNAPSHOT=0
LOCAL=0 LOCAL=0
# Major operation modes. # Major operation modes.
MODE_DIFFS=0
MODE_SOURCES=0 MODE_SOURCES=0
MODE_TARFILES=0 MODE_TARFILES=0
MODE_UPLOAD=0 MODE_UPLOAD=0
...@@ -444,6 +443,7 @@ DIFF="${DIFF:-diff -Nrc3pad}" ...@@ -444,6 +443,7 @@ DIFF="${DIFF:-diff -Nrc3pad}"
ENV="${ENV:-env}" ENV="${ENV:-env}"
GZIP="${GZIP:-gzip --best}" GZIP="${GZIP:-gzip --best}"
SCP="${SCP:-scp -p}" SCP="${SCP:-scp -p}"
SSH="${SSH:-ssh}"
TAR="${TAR:-tar}" TAR="${TAR:-tar}"
######################################################################## ########################################################################
...@@ -506,9 +506,9 @@ if [ $SNAPSHOT -eq 0 ]; then ...@@ -506,9 +506,9 @@ if [ $SNAPSHOT -eq 0 ]; then
# If this is not a final release, set various parameters acordingly. # If this is not a final release, set various parameters acordingly.
if [ ${FINAL} -ne 1 ]; then if [ ${FINAL} -ne 1 ]; then
RELEASE="${RELEASE}-${DATE}" RELEASE="${RELEASE}-${DATE}"
FTP_PATH="${FTP_PATH}/snapshots" FTP_PATH="${FTP_PATH}/snapshots/"
else else
FTP_PATH="${FTP_PATH}/releases/gcc-${RELEASE}" FTP_PATH="${FTP_PATH}/releases/gcc-${RELEASE}/"
fi fi
else else
RELEASE=$DATE RELEASE=$DATE
...@@ -557,6 +557,7 @@ export CVSROOT ...@@ -557,6 +557,7 @@ export CVSROOT
# Handle the major modes. # Handle the major modes.
while [ $# -ne 0 ]; do while [ $# -ne 0 ]; do
case $1 in case $1 in
diffs) MODE_DIFFS=1;;
sources) MODE_SOURCES=1;; sources) MODE_SOURCES=1;;
tarfiles) MODE_TARFILES=1;; tarfiles) MODE_TARFILES=1;;
upload) MODE_UPLOAD=1;; upload) MODE_UPLOAD=1;;
...@@ -578,6 +579,17 @@ if [ $MODE_TARFILES -ne 0 ]; then ...@@ -578,6 +579,17 @@ if [ $MODE_TARFILES -ne 0 ]; then
build_tarfiles build_tarfiles
fi fi
# Build diffs
if [ $MODE_DIFFS -ne 0 ]; then
# Possibly build diffs.
if [ -n "$OLD_TARS" ]; then
for old_tar in $OLD_TARS; do
build_diffs $old_tar
done
fi
fi
# Upload them to the FTP server. # Upload them to the FTP server.
if [ $MODE_UPLOAD -ne 0 ]; then if [ $MODE_UPLOAD -ne 0 ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment