10 lines
362 B
Text
10 lines
362 B
Text
|
#!/bin/sh
|
||
|
|
||
|
# cat /boot/grub/grub.cfg | sed -n "s/^menuentry [\"']\([^\"']*\)[\"'].*$/\1/gmp" | dmenu -i | tr -d '\n' | sudo xargs -t -r0 -n1 grub-reboot
|
||
|
# sudo /usr/bin/reboot
|
||
|
entry="$(sed -n "s/^menuentry [\"']\([^\"']*\)[\"'].*$/\1/gmp" /boot/grub/grub.cfg | dmenu -i | tr -d '\n')"
|
||
|
if [ -n "$entry" ]; then
|
||
|
sudo grub-reboot "$entry"
|
||
|
sudo /usr/bin/reboot
|
||
|
fi
|