summaryrefslogtreecommitdiff
path: root/urmoms
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2015-12-04 17:11:24 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2015-12-04 17:11:24 +0100
commit598615fa1b52360134d8dd41e60035d12d3177d5 (patch)
tree0db2ebf7e2f7d2c5b3ec50fb2be6d4f450e96092 /urmoms
parentacd240004960dbbce6081b338ee4ed1775acfd1e (diff)
add usage for urmoms, update TODO
Diffstat (limited to 'urmoms')
-rwxr-xr-x[-rw-r--r--]urmoms22
1 files changed, 18 insertions, 4 deletions
diff --git a/urmoms b/urmoms
index 3e30cda..de4bb4a 100644..100755
--- 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 ' ')