nopinentry

This commit is contained in:
tavo-wasd 2024-05-06 21:48:36 -06:00
parent 5089c199c2
commit b0a2b85332
2 changed files with 8 additions and 3 deletions

View file

@ -64,8 +64,13 @@ set_version() {
}
get_pass() {
TITLE="$1" ; PROMPT="$2"
printf 'setprompt %s\nsetdesc %s\nGETPIN\n' "$TITLE" "$PROMPT"
MENU="$1" TITLE="$2"
if [ "$MENU" = "zenity" ] ; then
zenity --title "$TITLE" --password
else
echo
fi
}
term_prompt() {

View file

@ -6,7 +6,7 @@ SAVE_FILE="$1"
SAVE_DIR="${SAVE_FILE%/*}"
[ -z "$SAVE_DIR" ] && return 1
SUDO_PASSWORD="$(get_pass "$TITLE" "$PROMPT_PASS_DEPS_INSTALL")"
SUDO_PASSWORD="$(get_pass "$MENU" "$TITLE")"
[ -z "$SUDO_PASSWORD" ] && return 1
printf '\033[1mInstalando y habilitando dependencias...\033[0m\n' # DEBUG