This commit is contained in:
vinceliuice 2021-06-01 10:54:29 +08:00
parent 8f4becc1a5
commit aa3e2b3c04

View File

@ -391,11 +391,9 @@ remove() {
} }
# Show terminal user interface for better use # Show terminal user interface for better use
if [[ $# -lt 1 ]] && [[ -x /usr/bin/dialog ]] ; then if [[ $# -eq 0 ]]; then
install_dialog && run_dialog if [[ ! -x /usr/bin/dialog ]]; then
fi if [[ $UID -ne $ROOT_UID ]]; then
if [[ $# -lt 1 ]] && [[ $UID -ne $ROOT_UID ]] && [[ ! -x /usr/bin/dialog ]] ; then
#Check if password is cached (if cache timestamp not expired yet) #Check if password is cached (if cache timestamp not expired yet)
sudo -n true 2> /dev/null && echo sudo -n true 2> /dev/null && echo
@ -420,6 +418,10 @@ if [[ $# -lt 1 ]] && [[ $UID -ne $ROOT_UID ]] && [[ ! -x /usr/bin/dialog ]] ; t
fi fi
fi fi
fi fi
install_dialog
fi
run_dialog
fi
while [[ $# -gt 0 ]]; do while [[ $# -gt 0 ]]; do
PROG_ARGS+=("${1}") PROG_ARGS+=("${1}")