Browse Source

Remove duplicated code

master
belliash 9 years ago
parent
commit
c35e55f9c8
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      libraries/common

+ 7
- 7
libraries/common View File

@ -47,25 +47,25 @@ function isSet() {
# Loads EzBuild configuration
#-------------------------------------------------------------------------------
function loadConfiguration() {
source ${EZROOT}/config/${EZNAME}.conf &> /dev/null || panic "Unable to load configuration files!\nYour EzBuild installation seems to be broken..."
source ${EZROOT}/config/layout.conf &> /dev/null || panic "Unable to load configuration files!\nYour EzBuild installation seems to be broken..."
source /etc/ezbuild/${EZNAME}.conf &> /dev/null || panic "Unable to load configuration files!\nYour EzBuild installation seems to be broken..."
source /etc/ezbuild/layout.conf &> /dev/null || panic "Unable to load configuration files!\nYour EzBuild installation seems to be broken..."
source ${EZROOT}/config/${EZNAME}.conf &> /dev/null || panic
source ${EZROOT}/config/layout.conf &> /dev/null || panic
source /etc/ezbuild/${EZNAME}.conf &> /dev/null || panic
source /etc/ezbuild/layout.conf &> /dev/null || panic
}
#-------------------------------------------------------------------------------
# Loads all EzBuild Libraries
#-------------------------------------------------------------------------------
function loadLibraries() {
source ${EZROOT}/libraries/colors &> /dev/null || panic "Unable to load necessary libraries!\nYour EzBuild installation seems to be broken..."
source ${EZROOT}/libraries/colors &> /dev/null || panic
}
#-------------------------------------------------------------------------------
# Outputs error message and aborts program execution
# Parameters: %message%
#-------------------------------------------------------------------------------
function panic() {
echo -e "FATAL ERROR: ${@}"
echo -e "FATAL ERROR: Unable to load necessary files!"
echo -e "Your EzBuild installation seems to be broken..."
exit 1
}


Loading…
Cancel
Save