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
This commit is contained in:
parent
0be9f7a2c6
commit
a01d64a4ad
6 changed files with 32 additions and 3 deletions
|
@ -224,6 +224,7 @@ installGitAnnex topdir = go (topdir </> "bin")
|
|||
error "strip failed"
|
||||
createSymbolicLink "git-annex" (bindir </> "git-annex-shell")
|
||||
createSymbolicLink "git-annex" (bindir </> "git-remote-tor-annex")
|
||||
createSymbolicLink "git-annex" (bindir </> "git-remote-annex")
|
||||
|
||||
main :: IO ()
|
||||
main = getArgs >>= go
|
||||
|
|
21
CmdLine/GitRemoteAnnex.hs
Normal file
21
CmdLine/GitRemoteAnnex.hs
Normal file
|
@ -0,0 +1,21 @@
|
|||
{- 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"
|
8
Makefile
8
Makefile
|
@ -1,4 +1,4 @@
|
|||
all=git-annex git-annex-shell mans docs
|
||||
all=git-annex git-annex-shell git-remote-annex mans docs
|
||||
|
||||
# set to "./Setup" if you lack a cabal program. Or can be set to "stack"
|
||||
BUILDER?=cabal
|
||||
|
@ -70,6 +70,9 @@ git-annex: tmp/configure-stamp
|
|||
git-annex-shell: git-annex
|
||||
ln -sf git-annex git-annex-shell
|
||||
|
||||
git-remote-annex: git-annex
|
||||
ln -sf git-annex git-remote-annex
|
||||
|
||||
# These are not built normally.
|
||||
git-union-merge.1: doc/git-union-merge.mdwn
|
||||
./Build/mdwn2man git-union-merge 1 doc/git-union-merge.mdwn > git-union-merge.1
|
||||
|
@ -90,6 +93,7 @@ install-bins: build
|
|||
install -d $(DESTDIR)$(PREFIX)/bin
|
||||
install git-annex $(DESTDIR)$(PREFIX)/bin
|
||||
ln -sf git-annex $(DESTDIR)$(PREFIX)/bin/git-annex-shell
|
||||
ln -sf git-annex $(DESTDIR)$(PREFIX)/bin/git-remote-annex
|
||||
ln -sf git-annex $(DESTDIR)$(PREFIX)/bin/git-remote-tor-annex
|
||||
|
||||
install-desktop: build Build/InstallDesktopFile
|
||||
|
@ -141,7 +145,7 @@ clean:
|
|||
doc/.ikiwiki html dist tags Build/SysConfig Build/Version \
|
||||
Setup Build/InstallDesktopFile Build/Standalone \
|
||||
Build/DistributionUpdate Build/BuildVersion Build/MakeMans \
|
||||
git-annex-shell git-union-merge .tasty-rerun-log
|
||||
git-annex-shell git-remote-annex git-union-merge .tasty-rerun-log
|
||||
find . -name \*.o -exec rm {} \;
|
||||
find . -name \*.hi -exec rm {} \;
|
||||
|
||||
|
|
|
@ -606,6 +606,7 @@ Executable git-annex
|
|||
CmdLine.GitAnnexShell.Fields
|
||||
CmdLine.AnnexSetter
|
||||
CmdLine.Option
|
||||
CmdLine.GitRemoteAnnex
|
||||
CmdLine.GitRemoteTorAnnex
|
||||
CmdLine.Seek
|
||||
CmdLine.Usage
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{- git-annex main program dispatch
|
||||
-
|
||||
- Copyright 2010-2016 Joey Hess <id@joeyh.name>
|
||||
- Copyright 2010-2024 Joey Hess <id@joeyh.name>
|
||||
-
|
||||
- Licensed under the GNU AGPL version 3 or higher.
|
||||
-}
|
||||
|
@ -13,6 +13,7 @@ import Network.Socket (withSocketsDo)
|
|||
|
||||
import qualified CmdLine.GitAnnex
|
||||
import qualified CmdLine.GitAnnexShell
|
||||
import qualified CmdLine.GitRemoteAnnex
|
||||
import qualified CmdLine.GitRemoteTorAnnex
|
||||
import qualified Test
|
||||
import qualified Benchmark
|
||||
|
@ -35,6 +36,7 @@ main = sanitizeTopLevelExceptionMessages $ withSocketsDo $ do
|
|||
where
|
||||
run ps n = case takeFileName n of
|
||||
"git-annex-shell" -> CmdLine.GitAnnexShell.run ps
|
||||
"git-remote-annex" -> CmdLine.GitRemoteAnnex.run ps
|
||||
"git-remote-tor-annex" -> CmdLine.GitRemoteTorAnnex.run ps
|
||||
_ -> CmdLine.GitAnnex.run Test.optParser Test.runner Benchmark.mkGenerator ps
|
||||
|
||||
|
|
Loading…
Reference in a new issue