Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix printing package names

  • Loading branch information...
commit c9bb725ec7e4d0065d2f8d91892c7b5f0af78533 1 parent 7e4358f
@kolmodin kolmodin authored
Showing with 6 additions and 7 deletions.
  1. +6 −6 Main.hs
  2. +0 −1  keyword-stat.cabal
View
12 Main.hs
@@ -33,7 +33,7 @@ main = do
pretty prettyColumns (map (\c -> replicate (fromAlign c) '-') prettyColumns)
forM_ ebuilds $ \(package_name, package_path) -> do
- let ebuild_file = wd </> package_path ++ ".ebuild"
+ let ebuild_file = package_path ++ ".ebuild"
exists <- doesFileExist ebuild_file
if not exists
then doesNotExist package_name
@@ -84,11 +84,11 @@ extractCPVR_pkgLine pkg_line =
x -> error (show x)
extractCPVR_m text =
- case splitDirectories text of
- [_, category, _package, pvr] -> Just (category </> pvr)
- [_, _package, pvr] -> Just pvr
- [_, pvr] -> Just pvr
- x -> Just ("?:" ++ text)
+ case reverse (splitDirectories text) of
+ (pvr:_package:category:_:_) -> Just (category </> pvr)
+ [pvr, _package, _] -> Just pvr
+ [pvr, _] -> Just pvr
+ x -> Just ("?:" ++ text)
extractCPVR text =
case extractCPVR_m text of
View
1  keyword-stat.cabal
@@ -12,4 +12,3 @@ build-type: Simple
executable: keyword-stat
main-is: Main.hs
-ghc-options:
Please sign in to comment.
Something went wrong with that request. Please try again.