Skip to content

Commit

Permalink
detectOS
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Feb 11, 2020
1 parent 6f426a1 commit d9898a1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/bot/precompileInclude.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,31 @@ function precompile_deactivator(package_path::String, precompile_path::String)
#_precompile_()
""")
end
################################################################
"""
detectOS()
Returns Operating System of a machine as a string.
"""
function detectOS()
allos = [Sys.iswindows,
Sys.isapple,
Sys.islinux,
Sys.isbsd,
Sys.isdragonfly,
Sys.isfreebsd,
Sys.isnetbsd,
Sys.isopenbsd,
Sys.isjsvm]
for os in allos
if os()
output = string(os)[3:end]
break
end
end
return output
end

################################################################

end

0 comments on commit d9898a1

Please sign in to comment.