packages feed

htar 0.4.0.1 → 0.4.0.2

raw patch · 2 files changed

+13/−3 lines, 2 filesdep ~tar

Dependency ranges changed: tar

Files

htar.cabal view
@@ -1,5 +1,5 @@ name:            htar-version:         0.4.0.1+version:         0.4.0.2 license:         BSD3 license-File:    LICENSE author:          Bjorn Bringert <bjorn@bringert.net>@@ -30,7 +30,7 @@     directory  >= 1.0,     filepath   >= 1.0,     bytestring >= 0.9,-    tar        == 0.4.*,+    tar        == 0.4.* && >= 0.4.2,     zlib       >= 0.4 && < 0.7,     bzlib      >= 0.4 && < 0.7 
htar.hs view
@@ -43,6 +43,12 @@                        . Tar.write =<< Tar.pack dir files     Extract  -> Tar.unpack dir . Tar.read . decompress compression =<< input     List     -> printEntries . Tar.read . decompress compression =<< input+    Append    | compression /= None+             -> die ["Append cannot be used together with compression."]+              | file == "-"+             -> die ["Append must be used on a file, not stdin/stdout."]+              | otherwise+             -> Tar.append file dir files   where     input  = if file == "-" then BS.getContents else BS.readFile  file     output = if file == "-" then BS.putStr      else BS.writeFile file@@ -52,7 +58,7 @@     printEntry = putStrLn . entryInfo verbosity  data Compression = None | GZip | BZip-  deriving Show+  deriving (Show, Eq)  compress :: Compression -> ByteString -> ByteString compress None = id@@ -151,6 +157,7 @@             | Create             | Extract             | List+            | Append   deriving Show  optDescr :: [OptDescr (Options -> Options)]@@ -164,6 +171,9 @@   , Option ['t'] ["list"]       (action List)       "List the contents of an archive."+  , Option ['r'] ["append"]+      (action Append)+      "Append files to the end of an archive."   , Option ['f'] ["file"]       (ReqArg (\f o -> o { optFile = f}) "ARCHIVE")       "Use archive file ARCHIVE."