mirror of https://github.com/voidlizard/hbs2
wip
This commit is contained in:
parent
ba5e122392
commit
ed7f18154f
|
@ -38,16 +38,17 @@ keymanEntries = do
|
|||
entry $ bindMatch "hbs2:keyman:config" $ \_ -> do
|
||||
mkForm "dict" <$> keymanGetConfig
|
||||
|
||||
entry $ bindMatch "hbs2:keyman:keys:add" $ \case
|
||||
[ LitStrVal ke ] -> do
|
||||
conf <- keymanGetConfig @C
|
||||
path <- getDefaultKeyPath conf
|
||||
let n = hashObject @HbSync (serialise ke) & pretty & show
|
||||
let fname = n `addExtension` ".key"
|
||||
let fpath = path </> fname
|
||||
liftIO $ TIO.writeFile fpath ke
|
||||
keymanUpdate
|
||||
pure $ mkStr fpath
|
||||
args [ arg "string" "keyring-data"] $
|
||||
entry $ bindMatch "hbs2:keyman:keys:add" $ \case
|
||||
[ LitStrVal ke ] -> do
|
||||
conf <- keymanGetConfig @C
|
||||
path <- getDefaultKeyPath conf
|
||||
let n = hashObject @HbSync (serialise ke) & pretty & show
|
||||
let fname = n `addExtension` ".key"
|
||||
let fpath = path </> fname
|
||||
liftIO $ TIO.writeFile fpath ke
|
||||
keymanUpdate
|
||||
pure $ mkStr fpath
|
||||
|
||||
_ -> throwIO (BadFormException @C nil)
|
||||
_ -> throwIO (BadFormException @C nil)
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#! /usr/bin/env -S bf6 file
|
||||
|
||||
(run:proc:attached hbs2-git3 (cdr *args))
|
||||
|
||||
|
||||
|
||||
|
|
@ -133,10 +133,11 @@ compression ; prints compression level
|
|||
[ StringLike s ] -> display $ mkStr @C (show $ pretty $ gitNormaliseRef (fromString s))
|
||||
_ -> throwIO (BadFormException @C nil)
|
||||
|
||||
entry $ bindMatch "test:hbs2:peer:poke" $ nil_ $ \syn -> do
|
||||
peer <- getClientAPI @PeerAPI @UNIX
|
||||
r <- callRpcWaitRetry @RpcPoke (TimeoutSec 0.5) 2 peer () >>= orThrowUser "hbs2-peer not found"
|
||||
notice $ pretty r
|
||||
brief "checks if hbs2-peer available"
|
||||
$ entry $ bindMatch "hbs2:peer:poke" $ nil_ $ \syn -> do
|
||||
peer <- getClientAPI @PeerAPI @UNIX
|
||||
r <- callRpcWaitRetry @RpcPoke (TimeoutSec 0.5) 2 peer () >>= orThrowUser "hbs2-peer not found"
|
||||
notice $ pretty r
|
||||
|
||||
hidden do
|
||||
entry $ bindMatch "git:hash:blob" $ nil_ $ const $ liftIO do
|
||||
|
|
|
@ -27,5 +27,8 @@ stdenv.mkDerivation {
|
|||
in ''
|
||||
mkdir -p $out/bin
|
||||
cp ${p}/bin/${name} $out/bin
|
||||
'';
|
||||
'';
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue