summaryrefslogtreecommitdiffstats
path: root/.root/usr/local/bin/grub-update
blob: af81a94bac74973900c8e2c2279b6e7253bdd06e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

set -e

if [ $UID -ne 0 ]; then
	echo "Invalid UID! Must be run as root!"
	exit -1
fi

mount /dev/nvme0n1p1 /boot/efi
grub-mkconfig -o /boot/efi/archlinux/x86_64-efi/grub/grub.cfg
/boot/efi/grub-workaround.sh
mv -f /boot/efi/grub/grub.cfg /boot/efi/grub/grub.cfg.old
cp /boot/efi/archlinux/x86_64-efi/grub/grub.cfg /boot/efi/grub/grub.cfg
umount /boot/efi/