#!/bin/bash

# Elevate script
if [ ! "$UID" -eq 0 ]
then
    sudo bash "$BASH_SOURCE" "$USER";
else
    EFI_BOOT_DIR="${EFI_BOOT_DIR:-"/boot"}";
    BOOTLOADER_ID=${BOOTLOADER_ID:-"Arch"};

    pushd "${BASH_SOURCE%/*}" > /dev/null;
    pacman --noconfirm -Syu grub efibootmgr os-prober;
    . ../../../Common/Config/GRUB/setup.sh;
    popd > /dev/null;
fi;