func badParam: add bad username
This commit is contained in:
parent
5e985f941e
commit
b9aa8d33f4
@ -22,12 +22,15 @@ mag="\e[95m"
|
|||||||
badParam () {
|
badParam () {
|
||||||
if [ "$1" = "empty" ]; then
|
if [ "$1" = "empty" ]; then
|
||||||
printf "${err}\nError: '%s' cannot have a NULL (empty) value.\n" "$2"
|
printf "${err}\nError: '%s' cannot have a NULL (empty) value.\n" "$2"
|
||||||
printf "${cyan}Please use '--help' for assistance${normal}\n\n"
|
printf "${cyan}Please use '--help' for assistance${norm}\n\n"
|
||||||
exit 1
|
exit 1
|
||||||
elif [ "$1" = "dne" ]; then
|
elif [ "$1" = "dne" ]; then
|
||||||
printf "${err}\nError: '%s %s'\n" \
|
printf "${err}\nError: '%s %s'\n" "$2" "$3"
|
||||||
|
printf "file or directory does not exist.${norm}\n\n"
|
||||||
|
exit 1
|
||||||
|
elif [ "$1" = "user" ]; then
|
||||||
|
printf "${err}\nError: '%s %s': User does not exist!${norm}\n\n" \
|
||||||
"$2" "$3"
|
"$2" "$3"
|
||||||
printf "file or directory does not exist.\n\n"
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user