Commit 49b2e410 authored by Andrew Gibiansky's avatar Andrew Gibiansky

Setup.hs now builds profile.tar, closes #164

parent ec9aa8e9
import Distribution.Simple
main = defaultMain
import Control.Applicative ((<$>))
import Data.List (isInfixOf)
import Codec.Archive.Tar (create)
import System.Directory (getDirectoryContents)
main = defaultMainWithHooks simpleUserHooks {
preBuild = makeProfileTar
}
makeProfileTar args flags = do
putStrLn "Building profile.tar."
let profileDir = "profile"
tarFile = profileDir ++ "/profile.tar"
files <- filter realFile <$> filter notProfileTar <$> getDirectoryContents profileDir
print files
create tarFile profileDir files
preBuild simpleUserHooks args flags
where
notProfileTar str = not $ "profile.tar" `isInfixOf` str
realFile str = str /= "." && str /= ".."
......@@ -37,7 +37,7 @@ maintainer: andrew.gibiansky@gmail.com
category: Development
build-type: Simple
build-type: Custom
-- Constraint on the version of Cabal needed to build this package.
cabal-version: >=1.16
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment