Skip to content

Commit 66decab

Browse files
committed
Add emanote run command to docs script
1 parent d289c6f commit 66decab

File tree

2 files changed

+27
-23
lines changed

2 files changed

+27
-23
lines changed

docs.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

rundoc.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env sh
2+
3+
if [ -z "$1" ]; then
4+
nix run github:srid/emanote -- -L ./doc
5+
else
6+
# Renders the docs, prints the location of the docs, opens the docs if possible
7+
#
8+
# Does not run the link checker. That's done in runtest.sh.
9+
nix --option sandbox false \
10+
build ${OVERRIDE_HASKELL_FLAKE} \
11+
-L --show-trace \
12+
github:hercules-ci/flake.parts-website \
13+
"$@"
14+
15+
DOCSHTML="$PWD/result/options/haskell-flake.html"
16+
17+
echo "Docs rendered to $DOCSHTML"
18+
19+
if [ "$(uname)" == "Darwin" ]; then
20+
open $DOCSHTML
21+
else
22+
if type xdg-open &>/dev/null; then
23+
xdg-open $DOCSHTML
24+
fi
25+
fi
26+
27+
fi

0 commit comments

Comments
 (0)