Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Naive fix for getting $DISTRO.name on linux
Please test, as I on OS X and cannot really test this myself
  • Loading branch information
lizmat committed Dec 3, 2014
1 parent f0ea067 commit 1632658
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/core/Distro.pm
Expand Up @@ -65,6 +65,18 @@ multi sub INITIALIZE_DYNAMIC('$*DISTRO') {
}
$auth := 'Apple Computer, Inc.'; # presumably
}
elsif $name eq 'linux' {
if qx/lb_release -a/ ~~ m/
Distributor \s+ ID\: \s+ (<[\w\ ]>+) \s+
Description\: \s+ (<[\w\ ]>+) \s+ (<[\d\.]>+) \s+
Release\: \s+ (<[\d\.]>+)
/ {
$auth := ~$0;
$name := ~$1;
$version := ~$2;
$release := ~$3;
}
}
Distro.new( :$name, :$version, :$release, :$auth, :$path-sep )
};
}
Expand Down

0 comments on commit 1632658

Please sign in to comment.