processCmd AddRepository{..} = do
  putStrLn "Ghost: adding a new repository."
  hFlush stdout
  home <- getHomeDirectory
  let repoDir = home </> "users" </> addRepoUserName </> addRepoName <.> "git"
  -- TODO check username
  -- TODO check repository name
  _ <- runAndWaitProcess "git"
    ["init", "--bare", repoDir]
    Nothing
  copyFile ("bin" </> "ghost-post-update")
    (repoDir </> "hooks" </> "post-update")
  return ()
processCmd AddRepository{..} = do
  putStrLn "Ghost: adding a new repository."
  hFlush stdout
  home <- getHomeDirectory
  let repoDir = home </> "users" </> addRepoUserName </> addRepoName <.> "git"
  -- TODO check username
  -- TODO check repository name
  _ <- runAndWaitProcess "git"
    ["init", "--bare", repoDir]
    Nothing
  copyFile ("bin" </> "ghost-post-update")
    (repoDir </> "hooks" </> "post-update")
  return ()
processCmd AddRepository{..} = do
  putStrLn "Ghost: adding a new repository."
  hFlush stdout
  home <- getHomeDirectory
  let repoDir = home </> "users" </> addRepoUserName </> addRepoName <.> "git"
  -- TODO check username
  -- TODO check repository name
  _ <- runAndWaitProcess "git"
    ["init", "--bare", repoDir]
    Nothing
  copyFile ("bin" </> "ghost-post-update")
    (repoDir </> "hooks" </> "post-update")
  return ()