From: Ulrich Dangel Date: Sun, 11 Dec 2011 14:44:31 +0000 (+0100) Subject: Update wallpaper in fai scripts X-Git-Tag: v0.17.1~50 X-Git-Url: http://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=79a11834165d11dd29c62d200aad37fe164d667a Update wallpaper in fai scripts --- diff --git a/etc/grml/fai/config/scripts/GRMLBASE/47-update-wallpaper b/etc/grml/fai/config/scripts/GRMLBASE/47-update-wallpaper new file mode 100755 index 0000000..ca0a303 --- /dev/null +++ b/etc/grml/fai/config/scripts/GRMLBASE/47-update-wallpaper @@ -0,0 +1,29 @@ +#!/bin/sh +# Filename: ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/47-update-wallpaper +# Purpose: Update the grml wallpaper +# Authors: grml-team (grml.org) +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +################################################################################ + +. "$GRML_LIVE_CONFIG" + +FONTFILE=${FONTFILE:-/usr/share/grml-live/fonts/graphicoreBitmapFont0-Light.otf} +TITLE_FONTSIZE=${TITLE_FONTSIZE:-200} +VERSION_FONTSIZE=${VERSION_FONTSIZE:-100} +GRML_BG=${GRML_BG:-$target/usr/share/grml/desktop-bg.png} +GRML_WALLPAPER=${GRML_WALLPAPER:-$target/usr/share/grml/desktop.jpg} + +if [ ! -x "$(which convert)" ]; then + echo "convert not installed, skipping wallpaper." + exit 0 +fi + +echo "Creating standard wallpaper" + +convert "$GRML_BG" -gravity center \ + -fill white -font "$FONTFILE" \ + -pointsize $TITLE_FONTSIZE \ + -draw "text 0,0 \"$GRML_NAME\"" \ + -pointsize $VERSION_FONTSIZE \ + -draw "text 0,$((TITLE_FONTSIZE+50)) \"$VERSION\"" "$GRML_WALLPAPER" diff --git a/etc/grml/fai/config/scripts/RELEASE/99-update-wallpaper b/etc/grml/fai/config/scripts/RELEASE/99-update-wallpaper new file mode 100755 index 0000000..283f54f --- /dev/null +++ b/etc/grml/fai/config/scripts/RELEASE/99-update-wallpaper @@ -0,0 +1,22 @@ +#!/bin/sh +# Filename: ${GRML_FAI_CONFIG}/config/scripts/RELEASE/99-update-wallpaper +# Purpose: Update the grml wallpaper +# Authors: grml-team (grml.org) +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +################################################################################ + +. "$GRML_LIVE_CONFIG" + +FONTFILE=${FONTFILE:-/usr/share/grml-live/fonts/graphicoreBitmapFont0-Light.otf} +TITLE_FONTSIZE=${TITLE_FONTSIZE:-200} +GRML_BG=${GRML_BG:-$target/usr/share/grml/desktop-bg.png} +GRML_WALLPAPER=${GRML_WALLPAPER:-$target/usr/share/grml/desktop.jpg} + +echo "Creating release wallpaper" + +convert "$GRML_BG" -gravity center \ + -fill white -font "$FONTFILE" \ + -pointsize $TITLE_FONTSIZE \ + -draw "text 0,0 \"$VERSION\"" "$GRML_WALLPAPER" +