Permalink
Browse files

untested package extraction

  • Loading branch information...
1 parent 25c8704 commit 034e13fbb7339199b01da56b0e01db4b26f48727 @phischu committed Mar 18, 2013
Showing with 9 additions and 5 deletions.
  1. +6 −2 ExtractPackage.hs
  2. +1 −1 ExtractPackages.hs
  3. +2 −2 Master.hs
View
@@ -14,10 +14,14 @@ extractPackage out = do
writeFile' out []
filenameToArchiveName :: FilePath -> FilePath
-filenameToArchiveName = undefined
+filenameToArchiveName path = wd</>"PackageArchives"</>name</>version</>name++"-"++version<.>"tar"<.>"gz" where
+ name = head (drop 2 path)
+ version = head (drop 3 path)
targetDirectory :: FilePath -> FilePath
-targetDirectory = undefined
+targetDirectory = wd</>"ExtractedPackages"</>name</>version</>name++"-"++version where
+ name = head (drop 2 path)
+ version = head (drop 3 path)
View
@@ -16,7 +16,7 @@ extractPackages out = do
writeFile' out ""
packageToExtractedName :: String -> FilePath
-packageToExtractedName package = wd</>"PackageArchives"</>name</>version</>name++"-"++version<.>"extracted"where
+packageToExtractedName package = wd</>"ExtractedPackages"</>name</>version</>name++"-"++version where
(name,version) = read package
View
@@ -32,9 +32,9 @@ main = shakeWithArgs (removeDirectoryRecursive "gen") shakeOptions {shakeThreads
wd</>"PackageArchives/*/*/*.tar.gz" *> downloadPackage
- wd</>"ExtractedPackages" *> extractPackages
+ wd</>"PackagesExtracted" *> extractPackages
- wd</>"PackageArchives/*/*/*.extracted" *> extractPackage
+ wd</>"ExtractedPackages/*/*/*" *> extractPackage

0 comments on commit 034e13f

Please sign in to comment.