Set /home/patrick/track as default tracking directory

This commit is contained in:
Patrick Lipka 2021-12-20 15:51:47 +01:00
parent e6d07328be
commit 4d38ca81da
2 changed files with 3 additions and 4 deletions

View File

@ -7,7 +7,7 @@ LDFLAGS := -lreadline
PREFIX ?= /usr/local PREFIX ?= /usr/local
USER_NAME ?= $(USER) USER_NAME ?= $(USER)
TRACKING_DIR ?= /home/$(USER)/track TRACKING_DIR ?= $(HOME)/track
BIN_PATH := bin BIN_PATH := bin
SRC_PATH := src SRC_PATH := src
@ -43,6 +43,7 @@ install: all
uninstall: uninstall:
rm -rf $(PREFIX)/bin/tt rm -rf $(PREFIX)/bin/tt
rm -rf $(PREFIX)/etc/tt.conf rm -rf $(PREFIX)/etc/tt.conf
@echo "tt has been uninstalled. Note: tracking data is still present at $(TRACKING_DIR)"
clean: clean:
rm -rf $(SRC_PATH)/*.o 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++` * `CXX` - C++ compiler, defaults to `g++`
* `PREFIX` - install prefix, defaults to `/usr/local` * `PREFIX` - install prefix, defaults to `/usr/local`
* `USER_NAME` - user name to be mentioned in monthly reports, defaults to `$USER` * `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` 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 sudo make install
~~~~ ~~~~
Note that there is no `/home` directory on macOS. You may want to set `TRACKING_DIR=/Users/$USER/track`.
## Settings ## Settings
The file `$PREFIX/etc/tt.conf` has the format `key=value` and contains the following 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 * `user_name` - user name to be mentioned in monthly reports