packages feed

htar 0.3 → 0.3.1

raw patch · 2 files changed

+10/−4 lines, 2 filesdep ~base

Dependency ranges changed: base

Files

htar.cabal view
@@ -1,5 +1,5 @@ name:            htar-version:         0.3+version:         0.3.1 license:         BSD3 license-File:    LICENSE author:          Bjorn Bringert <bjorn@bringert.net>@@ -21,7 +21,7 @@   main-is: htar.hs   ghc-options: -Wall   build-depends:-    base  >= 2,+    base  >= 2   && < 5,     tar   >= 0.3 && < 0.4,     zlib  >= 0.4 && < 0.6,     bzlib >= 0.4 && < 0.6,
htar.hs view
@@ -25,6 +25,7 @@  main' :: Options -> [FilePath] -> IO () main' (Options { optFile        = file,+                 optDir         = dir,                  optAction      = action,                  optCompression = compression,                  optVerbosity   = verbosity }) files =@@ -32,8 +33,8 @@     NoAction -> die ["No action given. Specify one of -c, -t or -x."]     Help     -> printUsage     Create   -> output . compress compression-                       . Tar.write =<< Tar.pack "" files-    Extract  -> Tar.unpack "." . Tar.read . decompress compression =<< input+                       . Tar.write =<< Tar.pack dir files+    Extract  -> Tar.unpack dir . Tar.read . decompress compression =<< input     List     -> printEntries . Tar.read . decompress compression =<< input   where     input  = if file == "-" then BS.getContents else BS.readFile  file@@ -127,6 +128,7 @@  data Options = Options {     optFile        :: FilePath, -- "-" means stdin/stdout+    optDir         :: FilePath,     optAction      :: Action,     optCompression :: Compression,     optVerbosity   :: Verbosity@@ -135,6 +137,7 @@ defaultOptions :: Options defaultOptions = Options {     optFile        = "-",+    optDir         = "",     optAction      = NoAction,     optCompression = None,     optVerbosity   = Concise@@ -161,6 +164,9 @@   , Option ['f'] ["file"]       (ReqArg (\f o -> o { optFile = f}) "ARCHIVE")       "Use archive file ARCHIVE."+  , Option ['C'] ["directory"]+      (ReqArg (\d o -> o { optDir = d }) "DIR")+      "Create or extract relative to DIR."   , Option ['z'] ["gzip", "gunzip", "ungzip"]       (compression GZip)       "Use gzip compression."