## arg 1:  the new package version
#pre_install() {
	# do something here
#}

## arg 1:  the new package version
post_install() {

# add plymouth to mkinitcpio
if [ -z "$(grep plymouth /etc/mkinitcpio.conf)" ];then
    sed -i '/HOOKS=/s/"/"plymouth /' /etc/mkinitcpio.conf
    sed -i '/HOOKS=/s/(/(plymouth /' /etc/mkinitcpio.conf
fi

# change plymouth theme
if [ -z "$(grep xivastudio /etc/plymouth/plymouthd.conf)" ];then
    plymouth-set-default-theme -R xivastudio
fi

}

## arg 2:  the old package version
#pre_upgrade() {
	# do something here
#}

## arg 2:  the old package version
post_upgrade() {
	post_install
	/usr/lib/plymouth/plymouth-update-initrd
}

## arg 1:  the old package version
#pre_remove() {
	# do something here
#}

## arg 1:  the old package version
#post_remove() {
	# do something here
#}
 
