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:
Manuel J. Garrido
2013-06-24 10:32:42 +02:00
parent 93d8e16d50
commit ce365df67c
4 changed files with 29 additions and 4 deletions

View File

@@ -45,6 +45,9 @@ mv todo.cfg custom.cfg
mv .todo.actions.d custom.actions
echo 'export TODO_ACTIONS_DIR=$HOME/custom.actions' >> custom.cfg
# Avoid the use of global config file, if it exists
export TODOTXT_GLOBAL_CFG_FILE=global.cfg
test_todo_session '-h and fatal error without config' <<EOF
>>> todo.sh -h | sed '/^ \\{0,2\\}[A-Z]/!d'
Usage: todo.sh [-fhpantvV] [-d todo_config] action [task_number] [task_description]