Adding dynamic informations into the splash and creating the png export at build time.

This commit is contained in:
Daniel Baumann 2012-07-07 23:52:02 +02:00
parent e605cf964e
commit cfc14171c4
1 changed files with 67 additions and 0 deletions

View File

@ -240,6 +240,73 @@ then
${_TARGET}/install.cfg
fi
if [ -e "${_TARGET}/splash.svg.in" ]
then
case "${LB_MODE}" in
progress)
_PROJECT="Progress Linux"
if ls config/package-lists/client-gnome.list*
then
_DESCRIPTION="Client GNOME"
elif ls config/package-lists/client-lxde.list* > /dev/null 2>&1
then
_DESCRIPTION="Client LXDE"
elif ls config/package-lists/server-lxc.list* > /dev/null 2>&1
then
_DESCRIPTION="Server LXC"
else
_DESCRIPTION="Standard"
fi
;;
*)
_PROJECT="Debian GNU/Linux"
_DESCRIPTION=""
;;
esac
eval _VERSION="$`echo RELEASE_${LB_DISTRIBUTION}`"
_DISTRIBUTION="${LB_DISTRIBUTION}"
_ARCHITECTURE="${LB_ARCHITECTURES}"
_DATE=$(date -R)
_YEAR="$(date +%Y)"
_MONTH="$(date +%m)"
_DAY="$(date +%d)"
_HOUR="$(date +%H)"
_MINUTE="$(date +%M)"
_SECOND="$(date +%S)"
_LINUX_VERSIONS="$(for _LINUX in chroot/boot/vmlinuz-* ; do chroot chroot apt-cache policy $(basename ${_LINUX} | sed -e 's|vmlinuz-|linux-image-|') | awk '/Installed: / { print $2 }' ; done)"
_LIVE_BUILD_VERSIONS="$(chroot chroot apt-cache policy live-build | awk '/Installed: / { print $2 }')"
_LIVE_BOOT_VERSIONS="$(chroot chroot apt-cache policy live-boot | awk '/Installed: / { print $2 }')"
_LIVE_CONFIG_VERSION="$(chroot chroot apt-cache policy live-config | awk '/Installed: / { print $2 }')"
_LIVE_TOOLS_VERSION="$(chroot chroot apt-cache policy live-tools | awk '/Installed: / { print $2 }')"
sed -e "s|@PROJECT@|${_PROJECT}|g" \
-e "s|@DISTRIBUTION@|${_DISTRIBUTION}|g" \
-e "s|@VERSION@|${_VERSION}|g" \
-e "s|@ARCHITECTURE@|${_ARCHITECTURE}|g" \
-e "s|@DESCRIPTION@|${_DESCRIPTION}|g" \
-e "s|@DATE@|${_DATE}|g" \
-e "s|@YEAR@|${_YEAR}|g" \
-e "s|@MONTH@|${_MONTH}|g" \
-e "s|@DAY@|${_DAY}|g" \
-e "s|@HOUR@|${_HOUR}|g" \
-e "s|@MINUTE@|${_MINUTE}|g" \
-e "s|@SECOND@|${_SECOND}|g" \
-e "s|@LINUX_VERSIONS@|${_LINUX_VERSIONS}|g" \
-e "s|@LIVE_BUILD_VERSION@|${_LIVE_BUILD_VERSIONS}|g" \
-e "s|@LIVE_BOOT_VERSION@|${_LIVE_BOOT_VERSION}|g" \
-e "s|@LIVE_CONFIG_VERSION@|${_LIVE_CONFIG_VERSION}|g" \
-e "s|@LIVE_TOOLS_VERSION@|${_LIVE_TOOLS_VERSION}|g" \
"${_TARGET}/splash.svg.in" > "${_TARGET}/splash.svg"
convert "${_TARGET}/splash.svg" "${_TARGET}/splash.png"
#rm -f "${_TARGET}/splash.svg.in" "{_TARGET}/splash.svg"
fi
case "${LB_MODE}" in
progress)
for _FILE in "${_TARGET}/isolinux.bin" "${_TARGET}/isolinux.cfg" "${_TARGET}/syslinux.cfg"