- Timestamp:
- Mar 19, 2019, 4:22:56 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
0.15.1/pb-modules/lib/ProjectBuilder/Distribution.pm
r2391 r2394 277 277 } 278 278 } 279 # 280 # Now look at the os-release file to see if we have a std distribution description 281 # 282 foreach my $r ("/usr/lib/os-release","/etc/os-release") { 283 if (-r $r) { 284 my $tmp = pb_get_content("$r"); 285 ($release) = $tmp =~ m/.*\nVERSION_ID=[\"\']*([0-9a-z\._-]+)[\"\']*\n/m; 286 ($distro) = $tmp =~ m/.*\nID=[\"\']*([0-9A-z\._-]+)[\"\']*\n/m; 287 # Remove the leap suffix if present (OpenSUSE) 288 $distro =~ s/-leap//; 289 if ((defined $release) && (defined $distro)) { 290 $found = 1; 291 last; 279 if ($found == 0) { 280 # 281 # Now look at the os-release file to see if we have a std distribution description 282 # 283 foreach my $r ("/usr/lib/os-release","/etc/os-release") { 284 if (-r $r) { 285 my $tmp = pb_get_content("$r"); 286 ($release) = $tmp =~ m/.*\nVERSION_ID=[\"\']*([0-9a-z\._-]+)[\"\']*\n/m; 287 ($distro) = $tmp =~ m/.*\nID=[\"\']*([0-9A-z\._-]+)[\"\']*\n/m; 288 # Remove the leap suffix if present (OpenSUSE) 289 $distro =~ s/-leap//; 290 if ((defined $release) && (defined $distro)) { 291 $found = 1; 292 last; 293 } 292 294 } 293 295 }
Note:
See TracChangeset
for help on using the changeset viewer.