add usage for urmoms, update TODO
M · TODO +3, -2 1@@ -1,3 +1,4 @@
2+- make baseurl in HTML page (header) configurable.
3 - be smarter about changes (an existing commit can never change the diff page).
4 - add raw link to latest files: raw/file...
5 - add summary page?
6@@ -5,11 +6,11 @@
7 - escape < > ' " etc, maybe even use CDATA ?
8 - shorter date format for logs.html page.
9 - speed up generating files.
10-- add stylesheet + 2f30/suckless logo.
11+x add stylesheet + 2f30/suckless logo.
12 - for files link to the commit but make the filename a link anchor.
13 - default to log view (stateless).
14 - link to lines in file view! / commit log?
15 - show all the tags and branches as list.
16 - show commits for all tags and branches???
17-- no tarballs, snapshots and such.
18+x no tarballs, snapshots and such.
19 - able to add link to git url: git://url... per project.
M · urmoms
+18, -4 1@@ -3,10 +3,10 @@
2 # DEBUG
3 #set -e -x
4
5-baseurl="http://cow.codemadness.org/gitlog/"
6-# TODO: read .git/description.
7-description="sbase"
8-logdir="../gitlog"
9+usage() {
10+ printf '%s <repodir> <htmldir>\n' "$0"
11+ exit 1
12+}
13
14 header() {
15 cat <<!__EOF__
16@@ -43,6 +43,20 @@ footer() {
17 !__EOF__
18 }
19
20+if test x"$1" = x"" || test x"$2" = x""; then
21+ usage
22+fi
23+
24+# repodir must be a directory to go to.
25+cd "$1" || usage
26+
27+# TODO: make configurable.
28+baseurl="http://cow.codemadness.org/gitlog/"
29+# TODO: read .git/description.
30+description="sbase"
31+
32+# absolute path to logdir.
33+logdir="$(readlink -f $2)"
34 mkdir -p "${logdir}"
35 firstcommit=$(git log | grep '^commit ' | tail -n 1 | cut -f 2 -d ' ')
36