#!/usr/bin/env bash
set -euo pipefail

echo "#################################"
echo "Start mylastarch-before"
echo "#################################"
echo "Populate Core Team keys"
echo "#################################"
pacman-key --init
pacman-key --populate
echo "Putting grub theme in again"
echo "#################################"
install -d /boot/grub/themes
cp -a /usr/share/grub/themes/viper /boot/grub/themes/

echo "Adding numeric kernel versions to GRUB menu titles"
echo "#################################"
/usr/local/sbin/mylastarch-grub-kernel-titles

echo "Protecting the graphical session from Arch-Update service restarts"
echo "#################################"
/usr/local/sbin/mylastarch-arch-update-safety

echo "#################################"
echo "End mylastarch-before"
echo "#################################"
rm -f /usr/local/bin/mylastarch-before
