From 1c9f883f15c46e31e76175a28dfa5a19a7e0e3c5 Mon Sep 17 00:00:00 2001 From: belliash Date: Tue, 10 Jan 2012 10:52:50 +0100 Subject: [PATCH] merge config files; all setting can be overwritten by putting them into ezbuild.conf or ezsync.conf --- config/common.conf | 29 +++++++++++++++++++++++++++++ config/ezbuild.conf | 29 ----------------------------- config/ezsync.conf | 29 ----------------------------- libraries/common | 2 ++ 4 files changed, 31 insertions(+), 58 deletions(-) create mode 100644 config/common.conf diff --git a/config/common.conf b/config/common.conf new file mode 100644 index 0000000..b477aa0 --- /dev/null +++ b/config/common.conf @@ -0,0 +1,29 @@ +# A time designation representing the time in seconds that you allow the connection to +# the server to take. This only limits the connection phase, once curl has connected +# this option is of no more use. Setting a timeout to 0 disables it altogether. Unless +# you know what you are doing, it is best not to change the default timeout settings. +FETCHTIMEOUT="180" + +# Sets the number of times EzBuild will attempt to download files and retrieve portage +# and overlays before it exits with an error. This allows for a more successful retrieval +# without user intervention most times. +FETCHTRIES="3" + +# Specifies where EzBuild will store everything that it builds, and also where it will +# put all its temporary files and caches. +TEMPDIR="/var/tmp/ezbuild" + +# When enabled, causes EzBuild to save every information about progress and all executed +# commands output in the log file. This might provide many useful information necessary +# for debugging purposes. +LOGGING="yes" + +# Using this, the default log date format can be changed according to the requirement. +# This customizable format may be needed when you want to perform analysis on the logs +# stored in the log file. +LOGDATEFORMAT="%d/%m/%Y %H:%M:%S" + +# Specifies an e-mail address, where all notifications will be sent to. If this variable +# is empty, none notification will be sent at all. This option requires logging to be +# also enabled. +NOTIFY="" diff --git a/config/ezbuild.conf b/config/ezbuild.conf index b477aa0..e69de29 100644 --- a/config/ezbuild.conf +++ b/config/ezbuild.conf @@ -1,29 +0,0 @@ -# A time designation representing the time in seconds that you allow the connection to -# the server to take. This only limits the connection phase, once curl has connected -# this option is of no more use. Setting a timeout to 0 disables it altogether. Unless -# you know what you are doing, it is best not to change the default timeout settings. -FETCHTIMEOUT="180" - -# Sets the number of times EzBuild will attempt to download files and retrieve portage -# and overlays before it exits with an error. This allows for a more successful retrieval -# without user intervention most times. -FETCHTRIES="3" - -# Specifies where EzBuild will store everything that it builds, and also where it will -# put all its temporary files and caches. -TEMPDIR="/var/tmp/ezbuild" - -# When enabled, causes EzBuild to save every information about progress and all executed -# commands output in the log file. This might provide many useful information necessary -# for debugging purposes. -LOGGING="yes" - -# Using this, the default log date format can be changed according to the requirement. -# This customizable format may be needed when you want to perform analysis on the logs -# stored in the log file. -LOGDATEFORMAT="%d/%m/%Y %H:%M:%S" - -# Specifies an e-mail address, where all notifications will be sent to. If this variable -# is empty, none notification will be sent at all. This option requires logging to be -# also enabled. -NOTIFY="" diff --git a/config/ezsync.conf b/config/ezsync.conf index b477aa0..e69de29 100644 --- a/config/ezsync.conf +++ b/config/ezsync.conf @@ -1,29 +0,0 @@ -# A time designation representing the time in seconds that you allow the connection to -# the server to take. This only limits the connection phase, once curl has connected -# this option is of no more use. Setting a timeout to 0 disables it altogether. Unless -# you know what you are doing, it is best not to change the default timeout settings. -FETCHTIMEOUT="180" - -# Sets the number of times EzBuild will attempt to download files and retrieve portage -# and overlays before it exits with an error. This allows for a more successful retrieval -# without user intervention most times. -FETCHTRIES="3" - -# Specifies where EzBuild will store everything that it builds, and also where it will -# put all its temporary files and caches. -TEMPDIR="/var/tmp/ezbuild" - -# When enabled, causes EzBuild to save every information about progress and all executed -# commands output in the log file. This might provide many useful information necessary -# for debugging purposes. -LOGGING="yes" - -# Using this, the default log date format can be changed according to the requirement. -# This customizable format may be needed when you want to perform analysis on the logs -# stored in the log file. -LOGDATEFORMAT="%d/%m/%Y %H:%M:%S" - -# Specifies an e-mail address, where all notifications will be sent to. If this variable -# is empty, none notification will be sent at all. This option requires logging to be -# also enabled. -NOTIFY="" diff --git a/libraries/common b/libraries/common index c4cdded..6f8a8f9 100644 --- a/libraries/common +++ b/libraries/common @@ -123,8 +123,10 @@ function isSet() { # Loads EzBuild configuration #------------------------------------------------------------------------------- function loadConfiguration() { + source ${EZROOT}/config/common.conf &> /dev/null || panic source ${EZROOT}/config/${EZNAME}.conf &> /dev/null || panic source ${EZROOT}/config/layout.conf &> /dev/null || panic + source /etc/ezbuild/common.conf &> /dev/null || panic source /etc/ezbuild/${EZNAME}.conf &> /dev/null || panic source /etc/ezbuild/layout.conf &> /dev/null || panic }