Skip to content

Commit

Permalink
Merge pull request #10 from derenv/sanity-fix
Browse files Browse the repository at this point in the history
fixed broken sanity check
  • Loading branch information
derenv authored Sep 15, 2021
2 parents 6413eec + d258a68 commit 09db014
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions bash-kernel-signer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function sign_kernel()
echo "$prev_out"
echo "=============================================="
echo "0 - Exit"
read -r user_input -p "Which kernel would you like to sign?:"
read -p "Which kernel would you like to sign?:" -r user_input

if [[ "$user_input" == "0" ]]; then
ERROR_MSG="cancelled.."
Expand Down Expand Up @@ -89,7 +89,7 @@ function purge_kernel()
echo "$prev_out"
echo "=============================================="
echo "0 - Exit"
read -r user_input -p "Which signed kernel would you like to purge?:"
read -p "Which signed kernel would you like to purge?:" -r user_input

if [[ "$user_input" == "0" ]]; then
ERROR_MSG="cancelled.."
Expand Down Expand Up @@ -246,7 +246,7 @@ while [[ "$stop" == "False" ]]; do
echo "5 - Modify Grub"
echo "6 - Reboot"
echo "0 - Exit"
read -r user_input -p "enter input:"
read -p "enter input:" -r user_input

if [[ "$user_input" == "1" ]]; then
if [[ "$valid_keys" == "True" ]]; then
Expand Down Expand Up @@ -278,7 +278,8 @@ while [[ "$stop" == "False" ]]; do
fi
elif [[ "$user_input" == "4" ]]; then
# check mainline present
if ! command -v mainline-gtk &> /dev/null; then
command_exists=$(su -c 'command -v mainline-gtk' "$(logname)")
if [[ -n "$command_exists" ]]; then
# redirect to mainline-gtk app
mainline-gtk
if [[ $? == 0 ]]; then
Expand All @@ -287,11 +288,12 @@ while [[ "$stop" == "False" ]]; do
prev_out="failure: $?"
fi
else
prev_out="grub-customizer not present!"
prev_out="mainline-gtk not present!"
fi
elif [[ "$user_input" == "5" ]]; then
command_exists=$(su -c 'command -v grub-customizer' "$(logname)")
# check grub-customizer present
if ! command -v grub-customizer &> /dev/null; then
if [[ -n "$command_exists" ]]; then
# redirect to grub-customizer app
grub-customizer
if [[ $? == 0 ]]; then
Expand Down

0 comments on commit 09db014

Please sign in to comment.