mirror of https://github.com/voidlizard/hbs2
wip
This commit is contained in:
parent
ff181e3e5c
commit
4c594105dc
|
@ -1,4 +1,9 @@
|
||||||
OUT:=$(shell git rev-parse --short HEAD)
|
REV:=$(shell git rev-parse --short HEAD)
|
||||||
|
|
||||||
|
define make_target
|
||||||
|
$(basename $(1))-$(REV)$(suffix $(1))
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
all: hbs2-git-problem hbs2-git-new-repo hbs2-git-doc
|
all: hbs2-git-problem hbs2-git-new-repo hbs2-git-doc
|
||||||
|
|
||||||
|
@ -7,13 +12,19 @@ all: hbs2-git-problem hbs2-git-new-repo hbs2-git-doc
|
||||||
%.pdf: %.tex
|
%.pdf: %.tex
|
||||||
xelatex $<
|
xelatex $<
|
||||||
xelatex $<
|
xelatex $<
|
||||||
|
cp $@ $(call make_target,$@)
|
||||||
|
|
||||||
hbs2-git-problem: hbs2-git-problem.pdf
|
hbs2-git-problem: hbs2-git-problem.pdf
|
||||||
|
|
||||||
hbs2-git-new-repo: hbs2-git-new-repo.pdf
|
hbs2-git-new-repo: hbs2-git-new-repo.pdf
|
||||||
|
|
||||||
hbs2-git-doc: hbs2-git-doc-0.24.1.pdf
|
hbs2-git-doc: hbs2-git-doc-0.24.1.pdf
|
||||||
@cp $< $(basename $<)-$(OUT)$(suffix $<)
|
|
||||||
|
publish-hbs2-git-doc: hbs2-git-doc-0.24.1.pdf
|
||||||
|
$(eval TARGET := $(call make_target,$<))
|
||||||
|
hbs2 metadata create --hash --auto $(TARGET)
|
||||||
|
|
||||||
|
publish: publish-hbs2-git-doc
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.aux *.log *.nav *.out *.snm *.vrb *.toc *.pdf
|
rm -f *.aux *.log *.nav *.out *.snm *.vrb *.toc *.pdf
|
||||||
|
|
|
@ -579,6 +579,7 @@ main = join . customExecParser (prefs showHelpOnError) $
|
||||||
o <- common
|
o <- common
|
||||||
how <- MetaDataAuto <$> strOption ( long "auto" <> metavar "FILENAME" <> help "automatic metadata from file name")
|
how <- MetaDataAuto <$> strOption ( long "auto" <> metavar "FILENAME" <> help "automatic metadata from file name")
|
||||||
dry <- flag False True (long "dry" <> short 'n' <> help "don't write to storage")
|
dry <- flag False True (long "dry" <> short 'n' <> help "don't write to storage")
|
||||||
|
hOnly <- flag False True (long "hash" <> short 'H' <> help "merely print hash")
|
||||||
|
|
||||||
pure $ flip runContT pure do
|
pure $ flip runContT pure do
|
||||||
|
|
||||||
|
@ -600,7 +601,9 @@ main = join . customExecParser (prefs showHelpOnError) $
|
||||||
|
|
||||||
let s = LBS8.pack $ show $ vcat meta
|
let s = LBS8.pack $ show $ vcat meta
|
||||||
|
|
||||||
liftIO $ LBS8.putStr s
|
unless hOnly do
|
||||||
|
liftIO $ LBS8.putStrLn s
|
||||||
|
liftIO $ LBS8.putStrLn ""
|
||||||
|
|
||||||
guard (not dry)
|
guard (not dry)
|
||||||
|
|
||||||
|
@ -621,8 +624,6 @@ main = join . customExecParser (prefs showHelpOnError) $
|
||||||
hnew <- putBlock sto (serialise mtann)
|
hnew <- putBlock sto (serialise mtann)
|
||||||
`orDie` "can't write merkle tree"
|
`orDie` "can't write merkle tree"
|
||||||
|
|
||||||
liftIO $ putStrLn ""
|
|
||||||
liftIO $ putStrLn ""
|
|
||||||
liftIO $ print $ pretty hnew
|
liftIO $ print $ pretty hnew
|
||||||
|
|
||||||
pGroupKey = pGroupKeySymm
|
pGroupKey = pGroupKeySymm
|
||||||
|
|
Loading…
Reference in New Issue