gcc_release (upload_files): Put diff files into a "diffs" subdirectory
authorGerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Tue, 20 May 2003 11:47:50 +0000 (13:47 +0200)
committerGerald Pfeifer <gerald@gcc.gnu.org>
Tue, 20 May 2003 11:47:50 +0000 (11:47 +0000)
* gcc_release (upload_files): Put diff files into a "diffs"
subdirectory

From-SVN: r66996

maintainer-scripts/ChangeLog
maintainer-scripts/gcc_release

index ffa5e6c01255a6d41f6700b9a1d41e8b8efc5c99..975c615a041dfbaaee4f66bdae826816b21e83b8 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 f8fcf63bfe886cca1871287469a51aeff2a4323e..9f22b839d0d21db456fb1175ffda4a48bb1b6834 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
 }