Set $HOME/track as default tracking directory

This commit is contained in:
Patrick Lipka 2021-12-20 15:58:00 +01:00
parent baae48ea2f
commit 3149c74f98
2 changed files with 3 additions and 4 deletions

View File

@ -7,7 +7,7 @@ LDFLAGS := -lreadline
PREFIX ?= /usr/local
USER_NAME ?= $(USER)
TRACKING_DIR ?= /home/$(USER)/track
TRACKING_DIR ?= $(HOME)/track
BIN_PATH := bin
SRC_PATH := src
@ -43,6 +43,7 @@ install: all
uninstall:
rm -rf $(PREFIX)/bin/tt
rm -rf $(PREFIX)/etc/tt.conf
@echo "tt has been uninstalled from $(PREFIX). The tracking data in $(TRACKING_DIR) has not been deleted."
clean:
rm -rf $(SRC_PATH)/*.o

View File

@ -23,7 +23,7 @@ The following variables can be used to configure the build:
* `CXX` - C++ compiler, defaults to `g++`
* `PREFIX` - install prefix, defaults to `/usr/local`
* `USER_NAME` - user name to be mentioned in monthly reports, defaults to `$USER`
* `TRACKING_DIR` - directory where tracking files are saved, defaults to `/home/$USER/track`
* `TRACKING_DIR` - directory where tracking files are saved, defaults to `$HOME/track`
The user name and tracking directory can also be set after installation by modifying `$PREFIX/etc/tt.conf`
@ -34,8 +34,6 @@ USER_NAME="<Your full name>" make
sudo make install
~~~~
Note that there is no `/home` directory on macOS. You may want to set `TRACKING_DIR=/Users/$USER/track`.
## Settings
The file `$PREFIX/etc/tt.conf` has the format `key=value` and contains the following settings:
* `user_name` - user name to be mentioned in monthly reports