From: Emil Velikov <[email protected]>

- correctly parse the url to retrieve the "section"
- add the new host_protocol, hostname/srv_path and MLs
- ensure that the path is created (since we store each version is
separate folder)
- strip out "-rc*" from the version number when constructing srv_path

Signed-off-by: Emil Velikov <[email protected]>
---
 release.sh | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/release.sh b/release.sh
index eb28552..ded62cf 100755
--- a/release.sh
+++ b/release.sh
@@ -242,8 +242,10 @@ get_section() {
            echo "Error: unable to extract section from $module_url second 
field."
            return 1
        elif [ x"$section" != xdrm ]; then
-           echo "Error: section $section is not supported, only libdrm is."
-           return 1
+               if [ x"$section" != xmesa ]; then
+                   echo "Error: section $section is not supported, only libdrm 
and mesa are."
+                   return 1
+               fi
        fi
     fi
 
@@ -507,6 +509,7 @@ process_module() {
     host_fdo="www.freedesktop.org"
     host_xorg="xorg.freedesktop.org"
     host_dri="dri.freedesktop.org"
+    host_ftp="ftp.freedesktop.org"
     host_wayland="wayland.freedesktop.org"
 
     # Mailing lists where to post the all [Announce] e-mails
@@ -515,6 +518,9 @@ process_module() {
     # Mailing lists to be CC according to the project (xorg|dri|xkb)
     list_xorg_user="[email protected]"
     list_dri_devel="[email protected]"
+    list_mesa_announce="[email protected]"
+    list_mesa_devel="[email protected]"
+
     list_xkb="[email protected]"
     list_xcb="[email protected]"
     list_nouveau="[email protected]"
@@ -544,6 +550,22 @@ process_module() {
         section_path=libdrm
         srv_path="/srv/$host_current/www/$section_path"
         list_cc=$list_dri_devel
+    elif [ x"$section" = xmesa ]; then
+        host_protocol="ftp"
+        host_current=$host_ftp
+        section_path=mesa
+        mesa_version=`echo $pkg_version | sed 's:-rc.*::'`
+        srv_path="/srv/$host_current/pub/$section_path/$mesa_version"
+        list_to=$list_mesa_announce
+        list_cc=$list_mesa_devel
+
+        # Mesa uses separate folder for each release
+        ssh $USER_NAME$hostname mkdir -p $srv_path  &>/dev/null
+        if [ $? -ne 0 ]; then
+            echo "Error: cannot create the path \"$srv_path\" on the web 
server."
+            cd $top_src
+            return 1
+        fi
     fi
 
     # Module xkeyboard-config goes in a subdir of the xorg "data" section
-- 
2.8.2

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to