[commit: ghc] wip/nfs-locking: Add support for both *.gz and *.bz2 archives, see #79. (fd3a1f8)
git at git.haskell.org
git at git.haskell.org
Thu Oct 26 23:52:27 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/fd3a1f89719fb551ed3f6579ef978ab304abe66c/ghc
>---------------------------------------------------------------
commit fd3a1f89719fb551ed3f6579ef978ab304abe66c
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Sun Jan 3 18:16:59 2016 +0000
Add support for both *.gz and *.bz2 archives, see #79.
>---------------------------------------------------------------
fd3a1f89719fb551ed3f6579ef978ab304abe66c
src/Settings/Builders/Tar.hs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/Settings/Builders/Tar.hs b/src/Settings/Builders/Tar.hs
index 1f9f0ba..f59b1cf 100644
--- a/src/Settings/Builders/Tar.hs
+++ b/src/Settings/Builders/Tar.hs
@@ -1,10 +1,14 @@
module Settings.Builders.Tar (tarBuilderArgs) where
+import Base
import Expression
import Predicates (builder)
tarBuilderArgs :: Args
tarBuilderArgs = builder Tar ? do
- mconcat [ arg "-xzf"
- , arg =<< getInput
+ input <- getInput
+ mconcat [ arg "-xf"
+ , ("*.gz" ?== input) ? arg "--gzip"
+ , ("*.bz2" ?== input) ? arg "--bzip2"
+ , arg input
, arg "-C", arg =<< getOutput ]
More information about the ghc-commits
mailing list