diff --git a/Makefile b/Makefile index 92a81bd..666c7f0 100644 --- a/Makefile +++ b/Makefile @@ -13,12 +13,13 @@ VERSION-FILE: .FORCE-VERSION-FILE todo.sh: VERSION-FILE # For packaging -DISTFILES := README todo.cfg todo.sh +DISTFILES := README todo.cfg DISTNAME=todo.sh-$(VERSION) dist: $(DISTFILES) todo.sh mkdir -p $(DISTNAME) cp -f $(DISTFILES) $(DISTNAME)/ + sed -e 's/@DEV_VERSION@/'$(VERSION)'/' todo.sh > $(DISTNAME)/todo.sh tar cf $(DISTNAME).tar $(DISTNAME)/ gzip -f -9 $(DISTNAME).tar zip -9r $(DISTNAME).zip $(DISTNAME)/ diff --git a/todo.sh b/todo.sh index 8d44ea2..a138590 100755 --- a/todo.sh +++ b/todo.sh @@ -3,8 +3,10 @@ # NOTE: Todo.sh requires the todo.cfg configuration file to run. # Place the todo.cfg file in your home directory or use the -d option for a custom location. +[ -f VERSION-FILE ] && . VERSION-FILE || VERSION="@DEV_VERSION@" version() { sed -e 's/^ //' <