mirror of
https://github.com/vinceliuice/grub2-themes.git
synced 2024-11-05 09:16:13 +01:00
avoiding redundant tui installer
This commit is contained in:
parent
eb0f404931
commit
924f2c6d98
@ -165,7 +165,7 @@ run_dialog() {
|
||||
|
||||
install_dialog() {
|
||||
if [ ! "$(which dialog 2> /dev/null)" ]; then
|
||||
prompt -i "\n 'dialog' needs to be installed for this shell "
|
||||
prompt -i "\n 'dialog' needs to be installed for this shell"
|
||||
if has_command zypper; then
|
||||
|
||||
sudo zypper in dialog
|
||||
@ -197,13 +197,12 @@ if [[ $# -lt 1 ]] && [[ $UID -ne $ROOT_UID ]]; then
|
||||
# persisted execution of the script as root
|
||||
read -p "[ trusted ] specify the root password : " -t${MAX_DELAY} -s
|
||||
[[ -n "$REPLY" ]]&& {
|
||||
sudo -S <<< $REPLY $0
|
||||
exec sudo -S <<< $REPLY $0
|
||||
}|| {
|
||||
prompt "\n Operation canceled Bye"
|
||||
exit 1
|
||||
}
|
||||
|
||||
run_dialog
|
||||
fi
|
||||
|
||||
while [[ $# -ge 1 ]]; do
|
||||
@ -234,5 +233,6 @@ while [[ $# -ge 1 ]]; do
|
||||
done
|
||||
|
||||
install_dialog && install
|
||||
test $? -eq 0 && prompt -w "* At the next restart of your computer you can admire your new Grub theme named << ${theme} >>"
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user