func badDetails for missing or invalid details

This commit is contained in:
Asif Bacchus 2019-05-27 03:08:54 -06:00
parent 68a51bf3c5
commit b95981e4bb
1 changed files with 9 additions and 0 deletions

View File

@ -17,6 +17,15 @@ mag=$(tput setaf 5)
### functions
# bad configuration value passed in details file
badDetails () {
if [ "$1" = "empty" ]; then
exitError 130 "details:${2} cannot be NULL (undefined)"
elif [ "$1" = "dne" ]; then
exitError 131 "details:${2} file or directory does not exist."
fi
}
# bad parameter passed to script
badParam () {
if [ "$1" = "dne" ]; then