Don't want a mass of old versions of git-annex in rpm form cluttering up
my server.
Also, makerepo falls over when confronted with a dangling symlink.
buildrpms :: FilePath -> [(FilePath, Version)] -> Annex ()
buildrpms topdir l = do
- liftIO $ createDirectoryIfMissing True rpmrepo
+ liftIO $ do
+ createDirectoryIfMissing True rpmrepo
+ oldrpms <- filter (".rpm" `isSuffixOf`)
+ <$> getDirectoryContents rpmrepo
+ mapM_ nukeFile oldrpms
forM_ tarrpmarches $ \(tararch, rpmarch) ->
forM_ (filter (isstandalonetarball tararch . fst) l) $ \(tarball, v) ->
void $ liftIO $ boolSystem script