Skip to content
Snippets Groups Projects
Commit e18647b7 authored by Alice Brenon's avatar Alice Brenon
Browse files

Rename function for more clarity: a subCorpus is hardlinked to the full corpus, not copied

parent b1cf10a1
No related branches found
No related tags found
No related merge requests found
......@@ -7,8 +7,8 @@ import System.FilePath ((</>), takeDirectory)
import System.Posix.Files (createLink)
import System.Script (syntax, try)
move :: String -> FilePath -> FilePath -> PrimaryKey -> IO ()
move extension sourceRoot targetRoot article = do
link :: String -> FilePath -> FilePath -> PrimaryKey -> IO ()
link extension sourceRoot targetRoot article = do
fileExists <- doesFileExist sourceFile
if fileExists
then do
......@@ -25,5 +25,5 @@ main :: IO ()
main = getArgs >>= run
where
run [files, extension, source, target] =
try (readNamedTsv files) >>= mapM_ (move extension source target)
try (readNamedTsv files) >>= mapM_ (link extension source target)
run _ = syntax "FILES.tsv EXTENSION SOURCE_DIRECTORY TARGET_DIRECTORY"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment