Update of /cvsroot/fink/scripts/installer/resources
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv30826/resources

Modified Files:
        InstallationCheck 
Log Message:
More work on platform checks.


Index: InstallationCheck
===================================================================
RCS file: /cvsroot/fink/scripts/installer/resources/InstallationCheck,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- InstallationCheck   1 Jun 2006 21:44:51 -0000       1.12
+++ InstallationCheck   6 Jun 2006 23:07:28 -0000       1.13
@@ -5,6 +5,9 @@
 my $result = 0, $basedir = "/sw";
 my $PACKAGE_PATH = $ENV{PACKAGE_PATH};
 
+my $target_OSX = '10.4';
+my $target_CPU = 'Power Macintosh';
+
 DO_CHECKS:
 {
        # The "19" specifies the index of the localized error string in
@@ -18,12 +21,13 @@
        } 
 
        # x.y.z form (10.4.6, for example)
-       my OSXVersion = qx{defaults read 
/System/Library/CoreServices/SystemVersion ProductUserVisibleVersion};
+       my $OSXVersion = qx{defaults read 
/System/Library/CoreServices/SystemVersion ProductUserVisibleVersion};
+       $OSXVersion = '' if !defined $OSXVersion;
        chomp $OSXVersion;
 
-       if ($OSXVersion != /^10\.4\./)
+       if ($OSXVersion !~ /^\Q$target_OSX./)
        {
-       print "Fink Installer: Fink requires Mac OS X 10.4 (Tiger) or later! 
Bailing out..\n";
+       print "Fink Installer: This Installer is for Mac OS X $target_OSX, not 
$OSXVersion. Bailing out.\n";
                $result = ((1 << 6) | (1 << 5) | 20);
         last;
        }
@@ -32,9 +36,9 @@
        # ("Power Macintosh" or "i386")
        my $CPUArch = (uname())[4];
 
-       if ($CPUArch ne 'Power Macintosh')
+       if ($CPUArch ne $target_CPU)
        {
-       print "Fink Installer: This Installer is for powerpc machines only! 
Bailing out..\n";
+       print "Fink Installer: This Installer is for $target_CPU machines, not 
$CPUArch. Bailing out.\n";
                $result = ((1 << 6) | (1 << 5) | 21);
         last;
        }



_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to