Commit 91df8404 authored by Jan-Philipp Stauffert's avatar Jan-Philipp Stauffert
Browse files

Make default provisioning platform dependent

parent c315ffe4
......@@ -20,6 +20,7 @@ import Data.Version
import Development.Shake
import Development.Shake.FilePath
import GHC.Conc (numCapabilities)
import System.Decker.OS (defaultProvisioning)
import System.Directory (createDirectoryIfMissing, createFileLink, removeFile)
import System.Environment.Blank
import System.FilePath ()
......@@ -59,8 +60,7 @@ main = do
" (branch: " ++
deckerGitBranch ++
", commit: " ++
deckerGitCommitId ++
", tag: " ++ deckerGitVersionTag ++ ")"
deckerGitCommitId ++ ", tag: " ++ deckerGitVersionTag ++ ")"
putNormal $ "pandoc version " ++ pandocVersion
putNormal $ "pandoc-types version " ++ showVersion pandocTypesVersion
--
......@@ -202,9 +202,15 @@ main = do
(directories ^. support)
Nothing ->
liftIO $
createFileLink
((directories ^. appData) </> "support")
(directories ^. support)
case defaultProvisioning of
SymLink ->
createFileLink
((directories ^. appData) </> "support")
(directories ^. support)
_ ->
copyDir
((directories ^. appData) </> "support")
(directories ^. support)
_ -> return ()
--
phony "check" checkExternalPrograms
......
......@@ -92,6 +92,14 @@ dependencies:
library:
source-dirs: src
when:
- condition: os(windows)
then:
source-dirs: src-win
exposed-modules: "System.Decker.OS"
else:
source-dirs: src-mac
exposed-modules: "System.Decker.OS"
executables:
decker:
......
{-- Author: Jan-Philipp Stauffert <jan-philipp.stauffert@uni-wuerzburg.de.de> --}
module System.Decker.OS
( defaultProvisioning
) where
import Common
defaultProvisioning :: Provisioning
defaultProvisioning = SymLink
{-- Author: Jan-Philipp Stauffert <jan-philipp.stauffert@uni-wuerzburg.de.de> --}
module System.Decker.OS
( defaultProvisioning
) where
import Common
defaultProvisioning :: Provisioning
defaultProvisioning = Copy
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment