1import System.Environment
3import Codec.Archive.Zip
4import qualified Data.ByteString.Lazy as BS
5import qualified Control.Exception as E
6import System.IO.Error (isDoesNotExistError)
8mkzip :: String -> IO ()
10 let dir = "data/"++fmt
11 output = "data/reference."++fmt
12 cd <- getCurrentDirectory
13 setCurrentDirectory dir
14 archive <- addFilesToArchive [OptRecursive] emptyArchive ["."]
15 setCurrentDirectory cd
17 BS.writeFile output $ fromArchive archive
19removeIfExists :: FilePath -> IO ()
20removeIfExists fileName = removeFile fileName `E.catch` handleExists
22 | isDoesNotExistError e = return ()
23 | otherwise = E.throwIO e
26main = getArgs >>= mkzip . (!!0)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list