hsbackup 0.1 → 0.1.1
raw patch · 2 files changed
+23/−2 lines, 2 files
Files
- Config.hs +21/−0
- hsbackup.cabal +2/−2
+ Config.hs view
@@ -0,0 +1,21 @@+{-# LANGUAGE DeriveDataTypeable #-}++module Config where++import System.Console.CmdArgs++data Config = Take { from :: FilePath, repo :: FilePath }+ | List { repo :: FilePath, root :: String }+ | Restore { repo :: FilePath, to :: FilePath, root :: String }+ deriving (Show, Data, Typeable)++conf :: [Mode Config]+conf =+ [ mode $ Take { repo = "" &= argPos 1 & typ "REPONAME"+ , from = "" &= argPos 0 & typ "DIRECTORY" }+ , mode $ List { repo = "" &= argPos 0 & typ "REPONAME"+ , root = "" &= flag "r" & typ "HASH" }+ , mode $ Restore { repo = "." &= argPos 0 & typ "REPONAME"+ , to = "" &= argPos 1 & typ "DIRECTORY"+ , root = "" &= flag "r" & typ "HASH" }+ ]
hsbackup.cabal view
@@ -1,5 +1,5 @@ name: hsbackup-version: 0.1+version: 0.1.1 synopsis: simple utility for rolling filesystem backups description: Take backups of a directory and store them in a hashed format. Currently only supports plain files and directories. Very crude@@ -24,7 +24,7 @@ Executable hsbackup main-is: main.hs- -- other-modules:+ other-modules: Config build-depends: base < 5, hashed-storage, cmdargs, strict, bytestring, filepath, directory, time, old-locale