]> git.armaanb.net Git - stagit.git/commitdiff
add usage for urmoms, update TODO
authorHiltjo Posthuma <hiltjo@codemadness.org>
Fri, 4 Dec 2015 16:11:24 +0000 (17:11 +0100)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Fri, 4 Dec 2015 16:11:24 +0000 (17:11 +0100)
TODO
urmoms [changed mode: 0644->0755]

diff --git a/TODO b/TODO
index a0fc0051fba0328d9527e2cf3ccef91de078e63a..2f5b25d2c139d0bcc63effda9b33f619e19d6a20 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,3 +1,4 @@
+- make baseurl in HTML page (header) configurable.
 - be smarter about changes (an existing commit can never change the diff page).
 - add raw link to latest files: raw/file...
 - add summary page?
@@ -5,11 +6,11 @@
 - escape < > ' " etc, maybe even use CDATA ?
 - shorter date format for logs.html page.
 - speed up generating files.
-- add stylesheet + 2f30/suckless logo.
+x add stylesheet + 2f30/suckless logo.
 - for files link to the commit but make the filename a link anchor.
 - default to log view (stateless).
 - link to lines in file view! / commit log?
 - show all the tags and branches as list.
 - show commits for all tags and branches???
-- no tarballs, snapshots and such.
+x no tarballs, snapshots and such.
 - able to add link to git url: git://url... per project.
diff --git a/urmoms b/urmoms
old mode 100644 (file)
new mode 100755 (executable)
index 3e30cda..de4bb4a
--- a/urmoms
+++ b/urmoms
@@ -3,10 +3,10 @@
 # DEBUG
 #set -e -x
 
-baseurl="http://cow.codemadness.org/gitlog/"
-# TODO: read .git/description.
-description="sbase"
-logdir="../gitlog"
+usage() {
+       printf '%s <repodir> <htmldir>\n' "$0"
+       exit 1
+}
 
 header() {
        cat <<!__EOF__
@@ -43,6 +43,20 @@ footer() {
 !__EOF__
 }
 
+if test x"$1" = x"" || test x"$2" = x""; then
+       usage
+fi
+
+# repodir must be a directory to go to.
+cd "$1" || usage
+
+# TODO: make configurable.
+baseurl="http://cow.codemadness.org/gitlog/"
+# TODO: read .git/description.
+description="sbase"
+
+# absolute path to logdir.
+logdir="$(readlink -f $2)"
 mkdir -p "${logdir}"
 firstcommit=$(git log | grep '^commit ' | tail -n 1 | cut -f 2 -d ' ')