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

View File

@ -17,6 +17,15 @@ mag=$(tput setaf 5)
### functions ### 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 # bad parameter passed to script
badParam () { badParam () {
if [ "$1" = "dne" ]; then if [ "$1" = "dne" ]; then