Update the luma sourcefiles
[xonotic/mediasource.git] / gfx / luma / render-version.sh
index aec318b..3677c18 100755 (executable)
@@ -24,7 +24,7 @@
 if [ "$1" = "--no-font-check" ]; then
        shift
 else
-       if [ -z "$(fc-list ':family=Xolonium:style=Regular')" ]; then
+       if [ -z "$(fc-list ':family=Xolonium GPL:style=Regular')" ]; then
                echo "Cannot find the Xolonium-Regular font."
                echo "Please install Xolonium before running this script."
                exit 2
@@ -34,21 +34,22 @@ fi
 
 # Check for arguments
 if [ -z "$1" ] || [ -z "$2" ]; then
-       echo "Usage: $0 [--no-font-check] DATADIR VERSION"
+       echo "Usage: $0 [--no-font-check] INPUTDIR OUTPUTDIR VERSION"
        exit 1
 fi
 
 
-data="$1"
-version="$2"
+input="$1"
+output="$2"
+version="$3"
 svgs="gfx/menu/luma/background_l2.svg
       gfx/menu/luma/background_ingame_l2.svg"
 
 
 for svg in $svgs; do
-       dir="$data/${svg%/*}"
-       tga="$data/${svg%.*}.tga"
+       dir="$output/${svg%/*}"
+       tga="$output/${svg%.*}.tga"
 
-       mkdir -p "$dir"
-       sed "s/LUMA/$version/g" "$svg" | rsvg-convert -z 2 | convert - -scale "50%" "$tga"
+       mkdir -p "$output"
+       sed "s/LUMA/$version/g" "$input/$svg" | rsvg-convert -z 2 | convert - -scale "50%" "$tga"
 done