#!/bin/bash

set -e

THEME_NAME="owl"

echo "Installing Plymouth theme: $THEME_NAME"

sudo mkdir -p /usr/share/plymouth/themes/$THEME_NAME
sudo cp -r ../theme/* /usr/share/plymouth/themes/$THEME_NAME/

sudo update-alternatives --install \
/usr/share/plymouth/themes/default.plymouth default.plymouth \
/usr/share/plymouth/themes/$THEME_NAME/owl.plymouth 100

sudo update-alternatives --set default.plymouth \
/usr/share/plymouth/themes/$THEME_NAME/owl.plymouth

sudo update-initramfs -u

echo "Done. Reboot to see changes."
