Last active
November 20, 2017 15:41
-
-
Save rebelwarrior/dbe2f757955b801a2cd90e52989cedc6 to your computer and use it in GitHub Desktop.
Revisions
-
rebelwarrior revised this gist
Nov 20, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -16,7 +16,7 @@ def idenfity_os end def identify_linux_distro distro = `python -c "import platform; print(platform.dist())"` case distro when /ubutu/i :ubuntu -
rebelwarrior revised this gist
Nov 14, 2017 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -13,4 +13,14 @@ def idenfity_os else fail "Couldn't recognize OS" end end def identify_linux_distro distro = `python -c "import platform; print platform.dist()"` case distro when /ubutu/i :ubuntu else :linux end end -
rebelwarrior created this gist
Nov 14, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ def idenfity_os require 'rbconfig' host_os = RbConfig::CONFIG['host_os'] case host_os when /darwin/, /Mac/ :mac when /linux/ identify_linux_distro when /cygwin|mswin|mingw|bccwin|wince|emx/ :windows when /solaris|bsd/ :unix else fail "Couldn't recognize OS" end end