This commit is contained in:
vinceliuice 2020-05-29 22:16:59 +08:00
parent 19435ba254
commit 8de4deae26

View File

@ -158,13 +158,13 @@ install() {
# persisted execution of the script as root # persisted execution of the script as root
if [[ -n ${tui_root_login} ]] ; then if [[ -n ${tui_root_login} ]] ; then
if [[ -n "${theme}" && -n "${screen}" ]]; then if [[ -n "${theme}" && -n "${screen}" ]]; then
sudo -S <<< ${tui_root_login} $0 ${ORIGINAL_ARGUMENTS} sudo -S <<< ${tui_root_login} $0 --${theme} --${icon} --${screen}
fi fi
else else
read -p "[ Trusted ] Specify the root password : " -t${MAX_DELAY} -s read -p "[ Trusted ] Specify the root password : " -t${MAX_DELAY} -s
[[ -n "$REPLY" ]] && { [[ -n "$REPLY" ]] && {
if [[ -n "${theme}" && -n "${screen}" ]]; then if [[ -n "${theme}" && -n "${screen}" ]]; then
sudo -S <<< $REPLY $0 ${ORIGINAL_ARGUMENTS} sudo -S <<< $REPLY $0 --${theme} --${icon} --${screen}
fi fi
} || { } || {
operation_canceled operation_canceled
@ -337,7 +337,6 @@ if [[ $# -lt 1 ]] && [[ $UID -ne $ROOT_UID ]] && [[ ! -x /usr/bin/dialog ]] ; t
fi fi
while [[ $# -ge 1 ]]; do while [[ $# -ge 1 ]]; do
ORIGINAL_ARGUMENTS="$ORIGINAL_ARGUMENTS $1"
case "${1}" in case "${1}" in
-b|--boot) -b|--boot)
THEME_DIR="/boot/grub/themes" THEME_DIR="/boot/grub/themes"