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
|
entry $ bindMatch "hbs2:keyman:config" $ \_ -> do
|
||||||
mkForm "dict" <$> keymanGetConfig
|
mkForm "dict" <$> keymanGetConfig
|
||||||
|
|
||||||
entry $ bindMatch "hbs2:keyman:keys:add" $ \case
|
args [ arg "string" "keyring-data"] $
|
||||||
[ LitStrVal ke ] -> do
|
entry $ bindMatch "hbs2:keyman:keys:add" $ \case
|
||||||
conf <- keymanGetConfig @C
|
[ LitStrVal ke ] -> do
|
||||||
path <- getDefaultKeyPath conf
|
conf <- keymanGetConfig @C
|
||||||
let n = hashObject @HbSync (serialise ke) & pretty & show
|
path <- getDefaultKeyPath conf
|
||||||
let fname = n `addExtension` ".key"
|
let n = hashObject @HbSync (serialise ke) & pretty & show
|
||||||
let fpath = path </> fname
|
let fname = n `addExtension` ".key"
|
||||||
liftIO $ TIO.writeFile fpath ke
|
let fpath = path </> fname
|
||||||
keymanUpdate
|
liftIO $ TIO.writeFile fpath ke
|
||||||
pure $ mkStr fpath
|
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))
|
[ StringLike s ] -> display $ mkStr @C (show $ pretty $ gitNormaliseRef (fromString s))
|
||||||
_ -> throwIO (BadFormException @C nil)
|
_ -> throwIO (BadFormException @C nil)
|
||||||
|
|
||||||
entry $ bindMatch "test:hbs2:peer:poke" $ nil_ $ \syn -> do
|
brief "checks if hbs2-peer available"
|
||||||
peer <- getClientAPI @PeerAPI @UNIX
|
$ entry $ bindMatch "hbs2:peer:poke" $ nil_ $ \syn -> do
|
||||||
r <- callRpcWaitRetry @RpcPoke (TimeoutSec 0.5) 2 peer () >>= orThrowUser "hbs2-peer not found"
|
peer <- getClientAPI @PeerAPI @UNIX
|
||||||
notice $ pretty r
|
r <- callRpcWaitRetry @RpcPoke (TimeoutSec 0.5) 2 peer () >>= orThrowUser "hbs2-peer not found"
|
||||||
|
notice $ pretty r
|
||||||
|
|
||||||
hidden do
|
hidden do
|
||||||
entry $ bindMatch "git:hash:blob" $ nil_ $ const $ liftIO do
|
entry $ bindMatch "git:hash:blob" $ nil_ $ const $ liftIO do
|
||||||
|
|
|
@ -27,5 +27,8 @@ stdenv.mkDerivation {
|
||||||
in ''
|
in ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp ${p}/bin/${name} $out/bin
|
cp ${p}/bin/${name} $out/bin
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue