Skip to content

Commit

Permalink
Merge pull request #8 from derenv/dependancy-checks
Browse files Browse the repository at this point in the history
added sanity checks for grub-zutomizer and mainline-gtk
  • Loading branch information
derenv authored Sep 15, 2021
2 parents ed6234d + 6d15b23 commit cc5d58a
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions bash-kernel-signer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -277,20 +277,30 @@ while [[ "$stop" == "False" ]]; do
prev_out="failure: $ERROR_MSG"
fi
elif [[ "$user_input" == "4" ]]; then
# redirect to mainline-gtk app
mainline-gtk
if [[ $? == 0 ]]; then
prev_out="success!"
# check mainline present
if ! command -v mainline-gtk &> /dev/null; then
# redirect to mainline-gtk app
mainline-gtk
if [[ $? == 0 ]]; then
prev_out="success!"
else
prev_out="failure: $?"
fi
else
prev_out="failure: $?"
prev_out="grub-customizer not present!"
fi
elif [[ "$user_input" == "5" ]]; then
# redirect to grub-customizer app
grub-customizer
if [[ $? == 0 ]]; then
prev_out="success!"
# check grub-customizer present
if ! command -v grub-customizer &> /dev/null; then
# redirect to grub-customizer app
grub-customizer
if [[ $? == 0 ]]; then
prev_out="success!"
else
prev_out="failure: $?"
fi
else
prev_out="failure: $?"
prev_out="grub-customizer not present!"
fi
elif [[ "$user_input" == "6" ]]; then
reboot
Expand Down

0 comments on commit cc5d58a

Please sign in to comment.