#!/bin/bash source $GIT_SCRIPTS/Okiru WindowsEntry=$(efibootmgr | grep "Windows Boot Manager" | awk '{print $1}' | sed -e 's/Boot//g') if [[ -n $WindowsEntry ]]; then debug "Found Windows entry: $WindowsEntry" ok "Found Windows! Rebooting" efibootmgr -n $WindowsEntry reboot else error "Found no Windows entry. SAD!" fi