implement printNotice(), quit() and fix die()
This commit is contained in:
parent
e3edcb53fc
commit
8ac9902ef0
3
ezbuild
3
ezbuild
|
@ -15,6 +15,9 @@ source ${EZROOT}/libraries/common
|
||||||
loadLibraries
|
loadLibraries
|
||||||
loadConfiguration
|
loadConfiguration
|
||||||
|
|
||||||
|
# Print EzBuild notice
|
||||||
|
printNotice
|
||||||
|
|
||||||
# Check system requirements
|
# Check system requirements
|
||||||
printInfo "Checking system prerequisites..."
|
printInfo "Checking system prerequisites..."
|
||||||
checkPrerequisites
|
checkPrerequisites
|
||||||
|
|
3
ezsync
3
ezsync
|
@ -15,6 +15,9 @@ source ${EZROOT}/libraries/common
|
||||||
loadLibraries
|
loadLibraries
|
||||||
loadConfiguration
|
loadConfiguration
|
||||||
|
|
||||||
|
# Print EzBuild notice
|
||||||
|
printNotice
|
||||||
|
|
||||||
# Check system requirements
|
# Check system requirements
|
||||||
printInfo "Checking system prerequisites..."
|
printInfo "Checking system prerequisites..."
|
||||||
checkPrerequisites
|
checkPrerequisites
|
||||||
|
|
|
@ -58,6 +58,7 @@ function die() {
|
||||||
echo -e "${MESG}\n${LOGS}" | mailx -s "${TOPIC}" "${NOTIFY}"
|
echo -e "${MESG}\n${LOGS}" | mailx -s "${TOPIC}" "${NOTIFY}"
|
||||||
fi
|
fi
|
||||||
printError "${1}"
|
printError "${1}"
|
||||||
|
echo -ne "\n"
|
||||||
exit ${2}
|
exit ${2}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,6 +191,15 @@ function printInfo() {
|
||||||
echo -e " ${MESSAGE_INFO} ${@}"
|
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
|
# Outputs formatted warning to both display and log file
|
||||||
# Parameters: %message%
|
# Parameters: %message%
|
||||||
|
@ -199,6 +209,11 @@ function printWarn() {
|
||||||
echo -e " ${MESSAGE_WARN} ${@}"
|
echo -e " ${MESSAGE_WARN} ${@}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function quit() {
|
||||||
|
echo -e "${COLOR_BOLD}ALL DONE!\n${COLOR_NORMAL}"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Restores original Internal Field Separator (IFS)
|
# Restores original Internal Field Separator (IFS)
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue