Do not overwrite splash.png if the user has provided it

The unconditional SVG to PNG conversion could overwrite a splash.png
provided by the user. Ensure we don't overwrite such a file. But we
still remove the SVG file as syslinux is not able to make use of it.
This commit is contained in:
Raphaël Hertzog 2020-04-25 10:49:35 +02:00
parent 103daf9f7c
commit 624e79eb8f
1 changed files with 2 additions and 3 deletions

View File

@ -282,7 +282,7 @@ else
sed -i -e "s#@OPTIONAL_MEMTEST_INCLUDE@#include memtest.cfg#g" "${_TARGET}"/advanced.cfg
fi
if [ -e "${_TARGET}/splash.svg" ]
if [ -e "${_TARGET}/splash.svg" ] && [ ! -e "${_TARGET}/splash.png" ]
then
case "${LB_BUILD_WITH_CHROOT}" in
true)
@ -296,9 +296,8 @@ then
rsvg-convert --format png --height 480 --width 640 "${_TARGET}/splash.svg" -o "${_TARGET}/splash.png"
;;
esac
rm -f "${_TARGET}/splash.svg"
fi
rm -f "${_TARGET}/splash.svg"
# Tweak the grub theme to reuse the syslinux background image
if [ -e binary/boot/grub/live-theme/theme.txt ]; then