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
if [[ $# -lt 1 ]] && [[ -x /usr/bin/dialog ]] ; then
install_dialog && run_dialog
fi
if [[ $# -lt 1 ]] && [[ $UID -ne $ROOT_UID ]] && [[ ! -x /usr/bin/dialog ]] ; then
if [[ $# -eq 0 ]]; then
if [[ ! -x /usr/bin/dialog ]]; then
if [[ $UID -ne $ROOT_UID ]]; then
#Check if password is cached (if cache timestamp not expired yet)
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
install_dialog
fi
run_dialog
fi
while [[ $# -gt 0 ]]; do
PROG_ARGS+=("${1}")