summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-07-07 23:52:02 +0200
committerDaniel Baumann <daniel@debian.org>2012-07-08 19:18:31 +0200
commitcfc14171c433698b33e4737b97359469dbcc6469 (patch)
treeb52c5cc9aa378e50d8855415df3fc0040cb4c671 /scripts
parente605cf964ea3625a26e4bce31b5e16c1bd697bc9 (diff)
downloadvyos-live-build-cfc14171c433698b33e4737b97359469dbcc6469.tar.gz
vyos-live-build-cfc14171c433698b33e4737b97359469dbcc6469.zip
Adding dynamic informations into the splash and creating the png export at build time.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/lb_binary_syslinux67
1 files changed, 67 insertions, 0 deletions
diff --git a/scripts/build/lb_binary_syslinux b/scripts/build/lb_binary_syslinux
index 487245e3b..6a4842b32 100755
--- a/scripts/build/lb_binary_syslinux
+++ b/scripts/build/lb_binary_syslinux
@@ -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"