forked from sitaramc/git-notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmkdoc
More file actions
executable file
·35 lines (26 loc) · 895 Bytes
/
mkdoc
File metadata and controls
executable file
·35 lines (26 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
# run from git-notes as "./mkdoc"
OUTDIR="/tmp/doc2"
OUTDIR="$HOME/data/gits/sitaramc.github.com"
rm $OUTDIR/*.html
rm -rf $OUTDIR/images
mkdir $OUTDIR/images
rm -rf $OUTDIR/archived
mkdir $OUTDIR/archived
for mkd in `find . -name "*.mkd" | sort`
do
base=$(basename $mkd .mkd)
[[ $mkd =~ archived ]] && base="archived/$base"
pdh -t html-N -i $mkd -o $OUTDIR/$base.html
done
mkdir -p $OUTDIR/tools
cp tools/* $OUTDIR/tools
# -- XXX do we need this? -- cp images/* $OUTDIR/images
# cleanup
rm fig*.png
cp index.html $OUTDIR
cd $OUTDIR
mkdir -p 1-basic-usage gcs the-list-and-irc
echo '"Try it and see" has <a href="../tias.html">moved</a>' > 1-basic-usage/tias.html
echo '"Git concepts simplified" has <a href="../gcs.html">moved</a>' > gcs/index.html
echo '"Git as a deployment tool" has <a href="../deploy.html">moved</a>' > the-list-and-irc/deploy.html