OSDN Git Service

* gcc_release (upload_files): Put diff files into a "diffs"
authorgerald <gerald@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 May 2003 11:47:50 +0000 (11:47 +0000)
committergerald <gerald@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 May 2003 11:47:50 +0000 (11:47 +0000)
subdirectory

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66996 138bc75d-0d04-0410-961f-82ee72b054a4

maintainer-scripts/ChangeLog
maintainer-scripts/gcc_release

index ffa5e6c..975c615 100644 (file)
@@ -1,3 +1,8 @@
+2003-05-20  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
+
+       * gcc_release (upload_files): Put diff files into a "diffs"
+       subdirectory
+
 2003-05-18  Nathanael Nerode  <neroden@gcc.gnu.org>
 
        * gcc_release: GNU CC -> GCC.
index f8fcf63..9f22b83 100755 (executable)
@@ -335,20 +335,30 @@ upload_files() {
 
   # Make sure the directory exists on the server.
   if [ $LOCAL -eq 0 ]; then
-    ${SSH} -l ${GCC_USERNAME} ${GCC_HOSTNAME} mkdir ${FTP_PATH}
+    ${SSH} -l ${GCC_USERNAME} ${GCC_HOSTNAME} \
+      mkdir -p "${FTP_PATH}/diffs"
     UPLOAD_PATH="${GCC_USERNAME}@${GCC_HOSTNAME}:${FTP_PATH}"
   else
-    mkdir -p "${FTP_PATH}" \
+    mkdir -p "${FTP_PATH}/diffs" \
       || error "Could not create \`${FTP_PATH}'"
     UPLOAD_PATH=${FTP_PATH}
   fi
 
+  # Then copy files to their respective (sub)directories.
   for x in gcc*.gz gcc*.bz2; do
     if [ -e ${x} ]; then
       # Make sure the file will be readable on the server.
       chmod a+r ${x}
       # Copy it.
-      ${SCP} ${x} ${UPLOAD_PATH} || error "Could not upload ${x}"
+      case ${x} in
+        *.diff.*)
+          SUBDIR="diffs/";
+          ;;
+        *)
+          SUBDIR="";
+      esac
+      ${SCP} ${x} ${UPLOAD_PATH}/${SUBDIR} \
+        || error "Could not upload ${x}"
     fi
   done
 }