Skip to content

Commit bde323b

Browse files
committed
;bin:tt: make it a little more generic
1 parent 94f44f5 commit bde323b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

bin/tt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
# Customise as needed; consider keeping as a git checkout for merging updates.
55
# Uses hledger, bash, python, a few other unix tools.
66
# wakelog is a script grepping system logs for sleep/wake events; provide it or comment it.
7+
# $TIMELOG should be set to the main time log file.
8+
# $TIMELOGDATA should be set to the time log data file if that's different.
79
# See also: justfile, an alternative.
810

911
## #!/usr/bin/env -S osh # -*- sh -*- # or osh - more powerful, less tool support
@@ -37,10 +39,7 @@ cd "$DIR"
3739

3840
# The file where actual time data is logged, for dashboard's stats.
3941
# This might or might not be the top-level $TIMELOG file.
40-
#TIMELOGDATA=$TIMELOG
41-
YEAR=$($date +%Y)
42-
TIMELOGDATA="$DIR"/time-"$YEAR".timedot
43-
42+
TIMELOGDATA=${TIMELOGDATA:-$TIMELOG}
4443

4544
# ** REPORTS ------------------------------------------------------------
4645

0 commit comments

Comments
 (0)