aboutsummaryrefslogtreecommitdiff
path: root/maintainer-scripts
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2002-02-24 01:37:10 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2002-02-24 01:37:10 +0000
commite776237d577583e7c2d9ca8dab7b3e56471b4c31 (patch)
tree70e77f9ec6a726a778061858c6d8aedccd5334d5 /maintainer-scripts
parent2450e0b8ea9b4b630995889b5584913d2d6e456f (diff)
gcc_release: Revert change to -p interface.
* gcc_release: Revert change to -p interface. Allow for local and remote cases in creating directories. Give an error if -p argument names a directory. From-SVN: r50000
Diffstat (limited to 'maintainer-scripts')
-rw-r--r--maintainer-scripts/ChangeLog6
-rwxr-xr-xmaintainer-scripts/gcc_release14
2 files changed, 15 insertions, 5 deletions
diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog
index de0ecd87abe..4d93cf58b3e 100644
--- a/maintainer-scripts/ChangeLog
+++ b/maintainer-scripts/ChangeLog
@@ -1,3 +1,9 @@
+2002-02-23 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * gcc_release: Revert change to -p interface. Allow for local and
+ remote cases in creating directories. Give an error if -p
+ argument names a directory.
+
2002-02-21 Mark Mitchell <mark@codesourcery.com>
* gcc_release: Correct handling of diff-generation. Add
diff --git a/maintainer-scripts/gcc_release b/maintainer-scripts/gcc_release
index bfe7fab709e..7e487e0c2b5 100755
--- a/maintainer-scripts/gcc_release
+++ b/maintainer-scripts/gcc_release
@@ -294,7 +294,7 @@ build_tarfiles() {
# Build diffs against an old release.
build_diffs() {
- old_dir=${1%/}
+ old_dir=${1%/*}
old_file=${1##*/}
old_vers=${old_file%.tar.gz}
old_vers=${old_vers#gcc-}
@@ -334,13 +334,14 @@ upload_files() {
changedir "${WORKING_DIRECTORY}"
- if [ $LOCAL -ne 0 ]; then
+ # Make sure the directory exists on the server.
+ if [ $LOCAL -eq 0 ]; then
+ ${SSH} -l ${GCC_USERNAME} ${GCC_HOSTNAME} mkdir ${FTP_PATH}
+ else
mkdir -p "${FTP_PATH}" \
|| error "Could not create \`${FTP_PATH}'"
fi
- # 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
if [ -e ${x} ]; then
# Make sure the file will be readable on the server.
@@ -463,7 +464,10 @@ while getopts "d:fr:u:t:p:sl" ARG; do
SCP=cp
FTP_PATH=~ftp/pub/gcc
PATH=~:/usr/local/bin:$PATH;;
- p) OLD_TARS="${OLD_TARS} ${OPTARG}";;
+ p) OLD_TARS="${OLD_TARS} ${OPTARG}"
+ if [ -d ${OPTARG} ]; then
+ error "-p argument must name a tarball"
+ fi;;
\?) usage;;
esac
done