[PATCH util/modular] release.sh: Add support for mesa-demos

Andreas Boll andreas.boll.dev at gmail.com
Fri Feb 23 09:40:17 UTC 2018


Signed-off-by: Andreas Boll <andreas.boll.dev at gmail.com>
---
 release.sh | 34 ++++++++++++++++++++++------------
 1 file changed, 22 insertions(+), 12 deletions(-)

diff --git a/release.sh b/release.sh
index ff89d2e..2045197 100755
--- a/release.sh
+++ b/release.sh
@@ -264,8 +264,10 @@ get_section() {
 	if [ $? -ne 0 ]; then
 	    echo "Error: unable to extract section from $module_url second field."
 	    return 1
-	elif [ x"$section" != xdrm ] && [ x"$section" != xmesa ]; then
-	    echo "Error: section $section is not supported, only libdrm and mesa are."
+	elif [ x"$section" != xdrm ] &&
+	     [ x"$section" != xmesa ] &&
+	     [ x"$section" != xdemos ]; then
+	    echo "Error: section $section is not supported, only libdrm, mesa and demos are."
 	    return 1
 	fi
     fi
@@ -582,7 +584,8 @@ process_module() {
         section_path=libdrm
         srv_path="/srv/$host_current/www/$section_path"
         list_cc=$list_dri_devel
-    elif [ x"$section" = xmesa ]; then
+    elif [ x"$section" = xmesa ] ||
+         [ x"$section" = xdemos ]; then
         host_current=$host_mesa
         mesa_version=`echo $pkg_version | sed 's:-rc.*::'`
         section_path=archive
@@ -590,16 +593,23 @@ process_module() {
         list_to=$list_mesa_announce
         list_cc=$list_mesa_devel
 
-        # Prior to 17.0.x Mesa uses separate folder for each release
-        if test `echo $mesa_version | cut -d'.' -f1` -lt 17; then
-            section_path=$section_path/$mesa_version
+        if [ x"$section" = xdemos ]; then
+            section_path=$section_path/$section
             srv_path="/srv/$host_current/www/$section_path"
-            echo "Info: creating mesa directory on web server:"
-            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
+
+        # Prior to 17.0.x Mesa uses separate folder for each release
+        if [ x"$section" = xmesa ]; then
+            if test `echo $mesa_version | cut -d'.' -f1` -lt 17; then
+                section_path=$section_path/$mesa_version
+                srv_path="/srv/$host_current/www/$section_path"
+                echo "Info: creating mesa directory on web server:"
+                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
         fi
     fi
-- 
2.16.1



More information about the xorg-devel mailing list