-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2021-05-19 Fred Gleason <[email protected]>
* Hacked the build system to make the PyPAD module install correctly on Debian-ish systems. Signed-off-by: Fred Gleason <[email protected]>
- Loading branch information
1 parent
70d773d
commit cb4f8fe
Showing
5 changed files
with
64 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21715,3 +21715,6 @@ | |
2021-05-19 Fred Gleason <[email protected]> | ||
* Removed the 'LOCAL_PREFIX' and 'RD_LIB_PATH' Autoconf | ||
substitutions from the build system. | ||
2021-05-19 Fred Gleason <[email protected]> | ||
* Hacked the build system to make the PyPAD module install | ||
correctly on Debian-ish systems. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,13 @@ | |
|
||
# get_distro.pl | ||
# | ||
# Try to determine the distribution name and version of the host machine. | ||
# Used as part of the AR_GET_DISTRO() macro. | ||
# Read various fields from 'os-release'. | ||
# Used as part of the AR_GET_DISTRO() macro. | ||
# | ||
# (C) Copyright 2012,2016 Fred Gleason <[email protected]> | ||
# See https://www.freedesktop.org/software/systemd/man/os-release.html | ||
# for a description of the various fields. | ||
# | ||
# (C) Copyright 2012-2021 Fred Gleason <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as | ||
|
@@ -22,13 +25,28 @@ | |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
# | ||
|
||
#USAGE: get_distro.pl NAME|VERSION|MAJOR|MINOR|POINT | ||
my $usage="USAGE: get_distro.pl NAME|PRETTY_NAME|ID|ID_LIKE|VERSION|MAJOR|MINOR|POINT"; | ||
|
||
if($ARGV[0] eq "NAME") { | ||
print &Extract("NAME"); | ||
exit 0; | ||
} | ||
|
||
if($ARGV[0] eq "PRETTY_NAME") { | ||
print &Extract("PRETTY_NAME"); | ||
exit 0; | ||
} | ||
|
||
if($ARGV[0] eq "ID") { | ||
print &Extract("ID"); | ||
exit 0; | ||
} | ||
|
||
if($ARGV[0] eq "ID_LIKE") { | ||
print &Extract("ID_LIKE"); | ||
exit 0; | ||
} | ||
|
||
if($ARGV[0] eq "VERSION") { | ||
print &Extract("VERSION_ID"); | ||
exit 0; | ||
|
@@ -63,18 +81,22 @@ | |
exit 0; | ||
} | ||
|
||
print $usage; | ||
exit 256; | ||
|
||
|
||
sub Extract | ||
{ | ||
if(open RELEASE,"<","/etc/os-release") { | ||
if((open RELEASE,"<","/etc/os-release") || | ||
(open RELEASE,"<","/usr/lib/os-release")) { | ||
while(<RELEASE>) { | ||
my @f0=split "\n",$_; | ||
for(my $i=0;$i<@f0;$i++) { | ||
my @f1=split "=",$f0[$i]; | ||
if($f1[0] eq $_[0]) { | ||
return substr($f1[1],1,length($f1[1])-2); | ||
$f1[1]=~s/^"(.*)"$/$1/; | ||
return $f1[1]; | ||
# return substr($f1[1],1,length($f1[1])-2); | ||
} | ||
} | ||
} | ||
|