From 924f2c6d98cca9374e4dcf7372dd4acec59e1d61 Mon Sep 17 00:00:00 2001 From: jukoo Date: Sat, 8 Jun 2019 12:43:35 +0000 Subject: [PATCH 1/2] avoiding redundant tui installer --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index ffa0e60..134ac27 100755 --- a/install.sh +++ b/install.sh @@ -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 From 59c426724a81373d014a5927a58cda8aaf99d468 Mon Sep 17 00:00:00 2001 From: jukoo Date: Sat, 8 Jun 2019 13:01:09 +0000 Subject: [PATCH 2/2] add message to alert user the theme used --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 134ac27..d98d902 100755 --- a/install.sh +++ b/install.sh @@ -126,7 +126,8 @@ install() { fi # Success message - prompt -s "\n All done!" + prompt -s "\n All done!" + prompt -w "* At the next restart of your computer you can admire your new Grub theme named << $theme >> " else # Error message @@ -233,6 +234,5 @@ 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