Changeset 34524


Ignore:
Timestamp:
11/05/20 00:13:31 (5 weeks ago)
Author:
ak19
Message:

Correct Mac OS name in log file being uploaded

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/nightly-tasks/snapshot/trunk/task.pl

    r34518 r34524  
    2424    #$osversion=`uname -r | sed 's/\..*$//'`;
    2525    $osversion=`uname -r`; #$osversion =~ s@\..*$@@;
    26     $osversion = ($osversion =~ m@^1[1-9]@i) ? "-Lion" : "";
     26    #$osversion = ($osversion =~ m@^1[1-9]@i) ? "-Lion" : "";
     27
     28    # e.g. https://en.wikipedia.org/wiki/MacOS_Mojave has darwin kernel version 18.7.0 
     29    # uname -r returns the major number. 18 in Mojave's example
     30    if($osversion =~ m@^11@i) {
     31        $osversion = "-Lion";
     32    } elsif($osversion =~ m@^12@i) {
     33        $osversion = "-Mountain-Lion";
     34    } elsif($osversion =~ m@^13@i) {
     35        $osversion = "-Mavericks"; # official name is not Maverick but Mavericks
     36    } elsif($osversion =~ m@^14@i) {
     37        $osversion = "-Yosemite";
     38    } elsif($osversion =~ m@^15@i) {
     39        $osversion = "-ElCapitan";
     40    } elsif($osversion =~ m@^16@i) {
     41        $osversion = "-Sierra";
     42    } elsif($osversion =~ m@^17@i) {
     43        $osversion = "-HighSierra";
     44    } elsif($osversion =~ m@^18@i) {
     45        # Running uname -v, shows that darwin kernel version = 18.7.0, which is Mojave
     46        # see https://en.wikipedia.org/wiki/MacOS_Mojave
     47        $osversion = "-Mojave";
     48    }
    2749}
    2850
Note: See TracChangeset for help on using the changeset viewer.