#!/bin/bash #Uses Inkscape, Gimp and sed. #Requires the provided Gimp script (all2tga.scm) to be present in ~/.gimp*/scripts/. #Creates the background_(ingame_)l2.tga images, with a given version string argument. #The appearance of the string is defined by the master element in background_l2.svg: #BlurAll > Version > VersionMaster #The visible parts (Fill, Border, Glow) are duplicates of the master element. #If the font or its size is changed, the gradients of the duplicates may need adjustment. #Check for valid argument if [ -z "$1" ] then echo "Usage:" echo "$0 [Version String]" echo "" exit 3 fi #Create tmp.svg with version string according to argument sed -e "s/VERSIONPLACEHOLDER/$1/" background_l2.svg > tmp.svg #Create tga files inkscape -f "tmp.svg" -d 90 -e "background_l2.png" gimp -d -f -i -b '(all2tga "background_l2.png" 1)' -b '(gimp-quit 0)' cp background_l2.tga background_ingame_l2.tga rm tmp.svg rm background_l2.png