From 10fa8a8beed77b43a00604f73a5500b247107986 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 13 Sep 2019 12:00:16 -0400 Subject: [PATCH] reorg --- Build/DistributionUpdate.hs | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Build/DistributionUpdate.hs b/Build/DistributionUpdate.hs index c5fa1f0d0c..976477ce43 100644 --- a/Build/DistributionUpdate.hs +++ b/Build/DistributionUpdate.hs @@ -56,25 +56,6 @@ tarrpmarches = , ("arm64", "aarch64") ] -buildrpms :: FilePath -> [(FilePath, Version)] -> Annex () -buildrpms topdir l = do - liftIO $ createDirectoryIfMissing True rpmrepo - forM_ tarrpmarches $ \(tararch, rpmarch) -> - forM_ (filter (isstandalonetarball tararch . fst) l) $ \(tarball, v) -> - void $ liftIO $ boolSystem script - [ Param rpmarch - , File tarball - , Param v - , File rpmrepo - ] - void $ liftIO $ boolSystem "createrepo" [File rpmrepo] - void $ inRepo $ runBool [Param "annex", Param "add", File rpmrepo] - where - isstandalonetarball tararch f = - ("git-annex-standalone-" ++ tararch ++ ".tar.gz") `isSuffixOf` f - script = topdir "standalone" "rpm" "rpmbuild-from-standalone-tarball" - rpmrepo = "git-annex/linux/current/rpms" - main :: IO () main = do useFileSystemEncoding @@ -235,3 +216,22 @@ virusFree f clamscan tmpdir unhfs dest f' = unlessM (boolSystem "7z" [ Param "x", Param ("-o" ++ dest), File f' ]) $ error $ "Failed extracting hfs " ++ f' + +buildrpms :: FilePath -> [(FilePath, Version)] -> Annex () +buildrpms topdir l = do + liftIO $ createDirectoryIfMissing True rpmrepo + forM_ tarrpmarches $ \(tararch, rpmarch) -> + forM_ (filter (isstandalonetarball tararch . fst) l) $ \(tarball, v) -> + void $ liftIO $ boolSystem script + [ Param rpmarch + , File tarball + , Param v + , File rpmrepo + ] + void $ liftIO $ boolSystem "createrepo" [File rpmrepo] + void $ inRepo $ runBool [Param "annex", Param "add", File rpmrepo] + where + isstandalonetarball tararch f = + ("git-annex-standalone-" ++ tararch ++ ".tar.gz") `isSuffixOf` f + script = topdir "standalone" "rpm" "rpmbuild-from-standalone-tarball" + rpmrepo = "git-annex/linux/current/rpms"