#!/bin/sh
# Debian's plymouth hook replaces the watermark of two-step themes with the
# desktop-base Debian logo. Restore the Armbian watermark in the initramfs.

PREREQ="plymouth"

prereqs() {
	echo "$PREREQ"
}

case "$1" in
	prereqs)
		prereqs
		exit 0
		;;
esac

src=/usr/share/plymouth/themes/armbian/watermark.png
dst="${DESTDIR}${src}"

# The plymouth hook copies the theme only when it is the default theme.
if [ -f "$src" ] && [ -d "${dst%/*}" ]; then
	cp "$src" "$dst"
fi

exit 0
