Browse Source

implement printNotice(), quit() and fix die()

master
belliash 9 years ago
parent
commit
8ac9902ef0
3 changed files with 21 additions and 0 deletions
  1. +3
    -0
      ezbuild
  2. +3
    -0
      ezsync
  3. +15
    -0
      libraries/common

+ 3
- 0
ezbuild View File

@ -15,6 +15,9 @@ source ${EZROOT}/libraries/common
loadLibraries
loadConfiguration
# Print EzBuild notice
printNotice
# Check system requirements
printInfo "Checking system prerequisites..."
checkPrerequisites


+ 3
- 0
ezsync View File

@ -15,6 +15,9 @@ source ${EZROOT}/libraries/common
loadLibraries
loadConfiguration
# Print EzBuild notice
printNotice
# Check system requirements
printInfo "Checking system prerequisites..."
checkPrerequisites


+ 15
- 0
libraries/common View File

@ -58,6 +58,7 @@ function die() {
echo -e "${MESG}\n${LOGS}" | mailx -s "${TOPIC}" "${NOTIFY}"
fi
printError "${1}"
echo -ne "\n"
exit ${2}
}
@ -190,6 +191,15 @@ function printInfo() {
echo -e " ${MESSAGE_INFO} ${@}"
}
#-------------------------------------------------------------------------------
# Outputs formatted information about EzBuild version and copyrights
#-------------------------------------------------------------------------------
function printNotice() {
echo -e "\n${COLOR_BOLD}EzBuild v${EZVERSION} (${EZNAME} launched)"
echo -e "${EZCOPYRIGHT}${COLOR_NORMAL}"
echo -e "${BORDER_STAR}\n"
}
#-------------------------------------------------------------------------------
# Outputs formatted warning to both display and log file
# Parameters: %message%
@ -199,6 +209,11 @@ function printWarn() {
echo -e " ${MESSAGE_WARN} ${@}"
}
function quit() {
echo -e "${COLOR_BOLD}ALL DONE!\n${COLOR_NORMAL}"
exit 0
}
#-------------------------------------------------------------------------------
# Restores original Internal Field Separator (IFS)
#-------------------------------------------------------------------------------


Loading…
Cancel
Save