Added support for ~/.sit per user config file.
This commit is contained in:
parent
393868777a
commit
ecb84751f8
2 changed files with 8 additions and 0 deletions
3
README
3
README
|
@ -23,6 +23,9 @@ It includes a variety of default values:
|
|||
* DEFAULT_PLATFORM
|
||||
* DEFAULT_COMPILER
|
||||
|
||||
A user specific configuration file $HOME/.sit" can be used to overwrite the
|
||||
settings in the global configuration file.
|
||||
|
||||
The installation process is currently controled with the following environment
|
||||
variables:
|
||||
* COMPILER
|
||||
|
|
5
sit
5
sit
|
@ -10,7 +10,12 @@ set -e
|
|||
|
||||
SIT_PATH=$(dirname $PWD/$0)
|
||||
SIT_CONFIG_FILE=$SIT_PATH/etc/sit.conf
|
||||
SIT_USER_CONFIG_FILE=$HOME/.sit
|
||||
|
||||
# Reading in user configuration file if it exists
|
||||
if [[ -e $SIT_USER_CONFIG_FILE ]] ; then
|
||||
source $SIT_USER_CONFIG_FILE
|
||||
fi
|
||||
# Reading in global configuration file
|
||||
if [[ -e $SIT_CONFIG_FILE ]] ; then
|
||||
source $SIT_CONFIG_FILE
|
||||
|
|
Loading…
Reference in a new issue