From 4335005aace161cb442aa03fac6be330151d34ef Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 29 Nov 2024 19:18:30 +0100 Subject: [PATCH] util --- sh/util.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sh/util.sh b/sh/util.sh index 3f1c614..7d9cc3f 100644 --- a/sh/util.sh +++ b/sh/util.sh @@ -1,10 +1,10 @@ -sh_list_block_devices() { +rwx_list_block_devices() { lsblk \ --noempty \ --output "NAME,SIZE,TYPE,FSTYPE,LABEL,MOUNTPOINTS" } -sh_not() { +rwx_not() { case "${1}" in "false") echo "true" ;; "true") echo "false" ;; @@ -12,11 +12,11 @@ sh_not() { esac } -sh_read_passphrase() { - sh_read_secret "PassPhrase: " +rwx_read_passphrase() { + rwx_read_secret "PassPhrase: " } -sh_read_secret() { +rwx_read_secret() { local prompt="${1}" local secret printf "%s" "${prompt}" 1>&2 @@ -28,10 +28,10 @@ sh_read_secret() { unset secret } -sh_warn_wipe() { +rwx_warn_wipe() { local tmp - sh_list_block_devices + rwx_list_block_devices printf "%s" "WIPE ${*} /?\\ OR CANCEL /!\\" read -r tmp - sh_log_trace "${tmp}" + rwx_log_trace "${tmp}" }