Pretty up some dialogs

This commit is contained in:
the-sane 2020-08-11 23:10:16 -04:00 committed by GitHub
parent 8ef8fba876
commit 8aa68034af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ message() {
margs=("--info" "--no-wrap" "--text=") margs=("--info" "--no-wrap" "--text=")
elif [ "$1" -eq 2 ]; then elif [ "$1" -eq 2 ]; then
# warning # warning
margs=("--warning" "--no-wrap" "--text=") margs=("--warning" "--text=")
elif [ "$1" -eq 3 ]; then elif [ "$1" -eq 3 ]; then
# question # question
margs=("--question" "--text=") margs=("--question" "--text=")
@ -110,7 +110,7 @@ message() {
getdirs() { getdirs() {
# Sanity checks # Sanity checks
if [ ! -d "$conf_dir" ]; then if [ ! -d "$conf_dir" ]; then
message 2 "Invalid config path:\n$conf_dir\nAborting." message 2 "Config directory not found. The script will now exit.\n\n$conf_dir"
exit 0 exit 0
fi fi
@ -246,7 +246,7 @@ sanitize() {
# Sanity check # Sanity check
if [ ! -d "$user_dir" ]; then if [ ! -d "$user_dir" ]; then
message 2 "Directory not found. The script will now exit.\n$user_dir" message 2 "Directory not found. The script will now exit.\n\n$user_dir"
exit 0 exit 0
fi fi