diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-12-18 12:16:52 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-12-18 12:17:05 -0800 |
commit | 906251e6237ccff60b4b4787cb40a7f8c7960cf7 (patch) | |
tree | 0fab165360b1eeb662bf8a29f70f6cf2b692d3b5 | |
parent | f4839cc581ccca6292c52172624e7402095e9fb4 (diff) | |
download | pandoc-906251e6237ccff60b4b4787cb40a7f8c7960cf7.tar.gz |
Remove data/make-reference-files.hs.
I don't think this has been used for a long time.
-rw-r--r-- | data/make-reference-files.hs | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/data/make-reference-files.hs b/data/make-reference-files.hs deleted file mode 100644 index 77e518496..000000000 --- a/data/make-reference-files.hs +++ /dev/null @@ -1,27 +0,0 @@ -import System.Environment -import System.Directory -import Codec.Archive.Zip -import qualified Data.ByteString.Lazy as BS -import qualified Control.Exception as E -import System.IO.Error (isDoesNotExistError) -import System.FilePath - -mkzip :: String -> IO () -mkzip fmt = do - let dir = "data" </> fmt - output = "data" </> "reference" <.> fmt - cd <- getCurrentDirectory - setCurrentDirectory dir - archive <- addFilesToArchive [OptRecursive] emptyArchive ["."] - setCurrentDirectory cd - removeIfExists output - BS.writeFile output $ fromArchive archive - -removeIfExists :: FilePath -> IO () -removeIfExists fileName = removeFile fileName `E.catch` handleExists - where handleExists e - | isDoesNotExistError e = return () - | otherwise = E.throwIO e - -main :: IO () -main = getArgs >>= mkzip . (!!0) |