Allow the use of global config file
If not found elsewhere, look for the config file in /etc/todo/config. `make install` installs a global config file, setting TODO_DIR=~/.todo. todo.sh creates TODO_DIR if it doesn't exist.
This commit is contained in:
6
Makefile
6
Makefile
@@ -33,9 +33,9 @@ clean:
|
||||
install:
|
||||
install --mode=755 todo.sh $(INSTALL_DIR)
|
||||
install --mode=644 todo_completion /etc/bash_completion.d/todo
|
||||
mkdir -p ~/.todo
|
||||
cp -n todo.cfg ~/.todo/config
|
||||
|
||||
mkdir -p /etc/todo
|
||||
[ -e /etc/todo/config ] || \
|
||||
sed "s/^\(export[ \t]*TODO_DIR=\).*/\1~\/.todo/" todo.cfg > /etc/todo/config
|
||||
#
|
||||
# Testing
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user