From 624e79eb8fc11d1ceeaf1b0e81f895fc0da4eebe Mon Sep 17 00:00:00 2001 From: Raphaƫl Hertzog Date: Sat, 25 Apr 2020 10:49:35 +0200 Subject: 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. --- scripts/build/binary_syslinux | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/build/binary_syslinux b/scripts/build/binary_syslinux index 4fd585dab..61d0a8bb3 100755 --- a/scripts/build/binary_syslinux +++ b/scripts/build/binary_syslinux @@ -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 -- cgit v1.2.3