Skip to content

Commit

Permalink
Add Alpine Linux in Distro (#56)
Browse files Browse the repository at this point in the history
* Add Alpine Linux detection
  • Loading branch information
matriphe authored and jrgp committed Aug 2, 2017
1 parent b0c1907 commit 8353ac7
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ cache/*.json
.idea
node_modules
*.sublime-workspace
/vendor
yarn.lock
2 changes: 1 addition & 1 deletion layout/icons.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added layout/icons/distro_alpinelinux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions layout/sass/_icons.sass
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ $icon-distro_fedora:url('icons/distro_fedora.png')
$icon-distro_arch:url('icons/distro_arch.png')
$icon-distro_redhat:url('icons/distro_redhat.png')
$icon-distro_raspbian:url('icons/distro_raspbian.png')
$icon-distro_alpinelinux:url('icons/distro_alpinelinux.png')
$icon-vm_hyper-v:url('icons/vm_hyper-v.png')
$icon-vm_vmware:url('icons/vm_vmware.png')
$icon-vm_virtualbox:url('icons/vm_virtualbox.png')
Expand Down
3 changes: 3 additions & 0 deletions layout/sass/icons.sass
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
.icon_distro_raspbian
background-image: $icon-distro_raspbian
width: 16px
.icon_distro_alpinelinux
background-image: $icon-distro_alpinelinux
width: 16px
.icon_vm_hyper-v
background-image: $icon-vm_hyper-v
width: 16px
Expand Down
5 changes: 5 additions & 0 deletions src/Linfo/OS/Linux.php
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,11 @@ public function getDistro()
'file' => '/etc/debian_version',
'distro' => 'Debian',
),
array(
'file' => '/etc/alpine-release',
'regex' => '/(?P<version>[\d\.]+)$/',
'distro' => 'Alpine Linux',
),
);

foreach ($contents_distros as $distro) {
Expand Down

0 comments on commit 8353ac7

Please sign in to comment.