danf: curl-www/dlwiz index.cgi,1.12,1.13

[email protected]
Newsgroups gmane.comp.web.curl.www.cvs
Message-ID <[email protected]>
Update of /cvsroot/curl/curl-www/dlwiz
In directory labb:/tmp/cvs-serv24364

Modified Files:
	index.cgi 
Log Message:
Even better OS detection (even some OSes for which we don't currently
have downloads!)


Index: index.cgi
===================================================================
RCS file: /cvsroot/curl/curl-www/dlwiz/index.cgi,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- index.cgi	8 Nov 2005 21:04:17 -0000	1.12
+++ index.cgi	29 Nov 2005 22:49:01 -0000	1.13
@@ -251,7 +251,10 @@
 
 if($pick_type && !$pick_os) {
 
-    if($ua =~ /(windows|win32|Win98|Win95|WinNT)/i) {
+    if($ua =~ /Windows 3\.|Win16/i) {
+        $sel_os = "DOS";
+    }
+    elsif($ua =~ /(windows|win32|Win98|Win95|Win9x|WinNT)/i) {
         $sel_os = "Win32";
     }
     elsif($ua =~ /Linux/i) {
@@ -296,7 +299,7 @@
     elsif($ua =~ /RISC OS/i) {
         $sel_os = "RISC OS";
     }
-    elsif($ua =~ /SymbianOS|Symbian OS/i) {
+    elsif($ua =~ /Symbian/i) {
         $sel_os = "Symbian OS";
     }
     elsif($ua =~ /OSF1/i) {
@@ -418,6 +421,8 @@
     }
     else {
         $sel_flav = "";
+
+        # Linux flavours (should really check for that first)
         if($ua =~ /mdk|Mandriva/i) {
             $sel_flav = "Mandriva";
         }
@@ -442,12 +447,23 @@
         elsif($ua=~ /Fedora|fc[\d]/i) {
             $sel_flav = "Fedora";
         }
+        elsif($ua=~ /ASPLinux/i) {
+            $sel_flav = "ASP";
+        }
+        elsif($ua=~ /VineLinux/i) {
+            $sel_flav = "Vine";
+        }
         # Some indicators of a PDA device
         # Not necessarily Familiar, but that's the best we have to offer
         elsif($ua=~ /Qtopia|Qt *embedded|embedix|PDA/i) {
             $sel_flav = "Familiar";
         }
 
+	# Non-Linux flavours
+        elsif($ua=~ /PocketPC|Windows CE/i) {
+            $sel_flav = "WinCE";
+        }
+
         showsteps();
 
         subtitle("Select for What Flavour");
@@ -508,6 +524,9 @@
         elsif($pick_flav eq "Redhat" && $ua =~ /centos([\d\.]+)/i) {
             $sel_ver = "RHEL" . $1;
         }
+        elsif($pick_flav eq "Redhat" && $ua =~ /\bEL([\d\.]+)/i) {
+            $sel_ver = "RHEL" . $1;
+        }
         elsif($pick_os eq "Win32" && $ua =~ /Windows NT ?5\b|Windows XP/i) {
             $sel_ver = "2000/XP";
         }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.