]> gitweb.fluxo.info Git - scripts.git/commitdiff
Support for timelogging code projects
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 31 Oct 2013 14:00:59 +0000 (12:00 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 31 Oct 2013 14:00:59 +0000 (12:00 -0200)
timelog

diff --git a/timelog b/timelog
index e5d43559905debff7adb744dd75ca23f7f43b51c..289c2986c9d42056e6447739a497028ac24c51bc 100755 (executable)
--- a/timelog
+++ b/timelog
@@ -9,6 +9,7 @@
 # https://github.com/winged/worklog
 
 BASE="$HOME/file"
+CODEBASE="$HOME/code"
 GROUP="$1"
 ACTION="$2"
 BASENAME="`basename $0`"
@@ -22,6 +23,10 @@ if [ -z "$EDITOR" ]; then
   EDITOR="vi"
 fi
 
+if [ -d "$CODEBASE/$GROUP" ] && [ ! -d "$BASE/$GROUP" ]; then
+  BASE="$CODEBASE"
+fi
+
 mkdir -p $BASE/$GROUP/worklog
 
 if [ ! -e "$BASE/$GROUP/worklog/projects" ]; then