File tree Expand file tree Collapse file tree 3 files changed +15
-13
lines changed
Expand file tree Collapse file tree 3 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 2020require 'rbconfig'
2121ruby_api = RbConfig ::CONFIG [ 'ruby_version' ]
2222os = case RUBY_PLATFORM
23- when /.*arm.*-linux.*/
24- :raspberry
2523 when /.*linux.*/
26- :linux
24+ if File . exist? ( '/etc/rpi-issue' )
25+ :raspberry
26+ else
27+ :linux
28+ end
2729 when /.*darwin.*/
2830 :osx
2931 when /.*mingw.*/
Original file line number Diff line number Diff line change @@ -627,12 +627,12 @@ def self.log_error(e)
627627
628628 def self . os
629629 case RUBY_PLATFORM
630- when /.*arm.*-linux.*/
631- :raspberry
632- when /aarch64.*linux.*/
633- :raspberry
634630 when /.*linux.*/
635- :linux
631+ if File . exist? ( '/etc/rpi-issue' )
632+ :raspberry
633+ else
634+ :linux
635+ end
636636 when /.*darwin.*/
637637 :macos
638638 when /.*mingw.*/
Original file line number Diff line number Diff line change @@ -19,12 +19,12 @@ module SonicPi
1919 module Util
2020 # Check which OS we're on
2121 case RUBY_PLATFORM
22- when /.*arm.*-linux.*/
23- @@os = :raspberry
24- when /aarch64.*linux.*/
25- @@os = :raspberry
2622 when /.*linux.*/
27- @@os = :linux
23+ if File . exist? ( '/etc/rpi-issue' )
24+ @@os = :raspberry
25+ else
26+ @@os = :linux
27+ end
2828 when /.*darwin.*/
2929 @@os = :osx
3030 when /.*mingw.*/
You can’t perform that action at this time.
0 commit comments