From ecb84751f8525ffadfbcc5bf289ddf09ebd3c762 Mon Sep 17 00:00:00 2001 From: Christoph Niethammer Date: Fri, 11 May 2012 08:02:14 +0000 Subject: [PATCH] Added support for ~/.sit per user config file. --- README | 3 +++ sit | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/README b/README index 9d7071d..3f80c7e 100644 --- a/README +++ b/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 diff --git a/sit b/sit index 956c4f1..8a19b20 100755 --- a/sit +++ b/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