git-annex/CmdLine/GitRemoteAnnex.hs
Joey Hess a01d64a4ad
add git-remote-annex stub and build machinery
Renamed git-remote-annex.sh, keeping it around for now for reference.

Sponsored-by: Graham Spencer on Patreon
2024-05-06 13:05:58 -04:00

21 lines
554 B
Haskell

{- git-remote-annex program
-
- Copyright 2024 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU AGPL version 3 or higher.
-}
module CmdLine.GitRemoteAnnex where
import Common
import qualified Annex
import qualified Git.CurrentRepo
import Annex.UUID
import Annex.Action
run :: [String] -> IO ()
run (_remotename:address:[]) = forever $
getLine >>= \case
l -> giveup $ "gitremote-helpers protocol error at " ++ show l
run (_remotename:[]) = giveup "remote address not configured"
run _ = giveup "expected remote name and address parameters"