Skip to content

Commit

Permalink
separate precompile_pather_multios
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Feb 16, 2020
1 parent b369509 commit 7ddcc2d
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/bot/precompile_include.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ end
################################################################
"""
precompile_pather(package_name::String)
precompile_pather_multios(package_name::String)
To get the path of precompile_package_name.jl file
Expand All @@ -34,19 +35,15 @@ Written exclusively for SnoopCompile Github actions.
precompile_path, precompileFolder = precompile_pather("MatLang")
```
"""
function precompile_pather(package_name::String, ismultios::Bool)
if !ismultios
return "\"../deps/SnoopCompile/precompile/precompile_$package_name.jl\"",
function precompile_pather(package_name::String)
return "\"../deps/SnoopCompile/precompile/precompile_$package_name.jl\"",
"$(pwd())/deps/SnoopCompile/precompile/"
else
os = detectos()[1]
return "\"../deps/SnoopCompile/precompile/$os/precompile_$package_name.jl\"",
"$(pwd())/deps/SnoopCompile/precompile/$os"
end
end

precompile_pather(package_name::Symbol, ismultios::Bool) = precompile_pather(string(package_name))
precompile_pather(package_name::Module, ismultios::Bool) = precompile_pather(string(package_name))
function precompile_pather_multios(package_name::String)
os = detectos()[1]
return "\"../deps/SnoopCompile/precompile/$os/precompile_$package_name.jl\"",
"$(pwd())/deps/SnoopCompile/precompile/$os"
end
################################################################
"""
create_includer_file(package_path::String, precompile_path::String)
Expand Down

0 comments on commit 7ddcc2d

Please sign in to comment.