From b110b4e5dd9b051514707aa6910e2c61baf2d379 Mon Sep 17 00:00:00 2001 From: oddlama Date: Mon, 31 May 2021 17:27:03 +0200 Subject: [PATCH] Visual linebreak after reading password --- scripts/functions.sh | 2 ++ scripts/utils.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/functions.sh b/scripts/functions.sh index fb56f2b..5ab5f6d 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -99,6 +99,7 @@ function check_encryption_key() { flush_stdin read -s -r -p "Enter encryption key: " encryption_key_1 \ || die "Error in read" + echo [[ ${#encryption_key_1} -ge 8 ]] \ || { ewarn "Your encryption key must be at least 8 characters long."; continue; } @@ -106,6 +107,7 @@ function check_encryption_key() { flush_stdin read -s -r -p "Repeat encryption key: " encryption_key_2 \ || die "Error in read" + echo [[ "$encryption_key_1" == "$encryption_key_2" ]] \ || { ewarn "Encryption keys mismatch."; continue; } diff --git a/scripts/utils.sh b/scripts/utils.sh index 561cba2..3b75668 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -10,7 +10,7 @@ function einfo() { } function ewarn() { - echo "[!] $*" >&2 + echo "[!] $*" >&2 } function eerror() {