aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2025-09-08 11:49:04 +0200
committerEgor Tensin <egor@tensin.name>2025-09-08 11:49:04 +0200
commit61db455358ba641b156cc8891acb2ba14c924575 (patch)
tree74d27879d7a8b0d4bc2470d44d26a78255a936e9
parentaur: 0.2-1 (diff)
downloadgrub-reboot-into-windows-61db455358ba641b156cc8891acb2ba14c924575.tar.gz
grub-reboot-into-windows-61db455358ba641b156cc8891acb2ba14c924575.zip
split master-related stuff to master
-rw-r--r--.gitattributes2
-rw-r--r--icon.svg1
-rwxr-xr-xreboot-into-windows43
-rw-r--r--reboot-into-windows.desktop8
-rw-r--r--sudoers1
5 files changed, 0 insertions, 55 deletions
diff --git a/.gitattributes b/.gitattributes
index a2f2f07..176a458 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1 @@
* text=auto
-
-/reboot-into-windows text eol=lf
diff --git a/icon.svg b/icon.svg
deleted file mode 100644
index 4fbbd4e..0000000
--- a/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#0078d4" d="M67.328 67.331h60.669V128H67.328zm-67.325 0h60.669V128H.003zM67.328 0h60.669v60.669H67.328zM.003 0h60.669v60.669H.003z"/></svg>
diff --git a/reboot-into-windows b/reboot-into-windows
deleted file mode 100755
index a6584b9..0000000
--- a/reboot-into-windows
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env bash
-
-set -o errexit -o nounset -o pipefail
-shopt -s inherit_errexit lastpipe
-
-readonly cfg_path=/boot/grub/grub.cfg
-
-get_windows_menu_entry() {
- local windows_entries
- windows_entries="$( awk -F\' '/menuentry / {print $2}' "$cfg_path" | grep -Fi Windows )"
-
- local numof_entries
- numof_entries="$( echo "$windows_entries" | wc -l )"
-
- if [ "$numof_entries" -ne 1 ]; then
- echo "Don't know which one of the following entries to select:" >&2
- echo "$windows_entries" >&2
- return 1
- fi
-
- echo "$windows_entries"
-}
-
-main() {
- local entry
- entry="$( get_windows_menu_entry )"
-
- # grub-reboot returns 0 even if something like a permission error happens.
- # It does print something in that case though, and nothing after a
- # successful termination.
- local output
- output="$( grub-reboot "$entry" )"
-
- if [ -n "$output" ]; then
- echo "grub-reboot probably exited with an error:" >&2
- echo "$output" >&2
- return 1
- fi
-
- reboot
-}
-
-main
diff --git a/reboot-into-windows.desktop b/reboot-into-windows.desktop
deleted file mode 100644
index 122ed82..0000000
--- a/reboot-into-windows.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Type=Application
-Name=Reboot into Windows
-Comment=Use grub-reboot to reboot into Windows
-Terminal=false
-Exec=sudo reboot-into-windows
-Icon=/usr/share/reboot-into-windows/icon.svg
-Categories=System
diff --git a/sudoers b/sudoers
deleted file mode 100644
index 4bb7722..0000000
--- a/sudoers
+++ /dev/null
@@ -1 +0,0 @@
-ALL ALL=(ALL) NOPASSWD: /usr/bin/reboot-into-windows