From: Mattia Basaglia Date: Thu, 5 Feb 2015 18:25:00 +0000 (+0100) Subject: Minor tweaks to the minigame texture build script X-Git-Tag: xonotic-v0.8.2~15^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9f895166fd353683ba1b04b7fd56e07f531b212a;p=xonotic%2Fmediasource.git Minor tweaks to the minigame texture build script --- diff --git a/gfx/minigames/build.sh b/gfx/minigames/build.sh index 49e0e4a..5e47774 100755 --- a/gfx/minigames/build.sh +++ b/gfx/minigames/build.sh @@ -7,7 +7,7 @@ MKDIR="mkdir -p" OUT_DIR=/tmp/minigames JPEG_QUALITY=75 TEXTURE_SIZE=2048 -FORMAT=png +FORMAT=tga # Converts images into $FORMAT # Synopsis: convert_image input.png output @@ -56,9 +56,9 @@ function scale_image() # Create the files for packaging function generate() { - for src_file in $(git ls-files) + for src_file in $(git ls-files '*/*') do - local out_dir="$OUT_DIR/gfx/hud/default/" + local out_dir="$OUT_DIR/gfx/hud/default/minigames/" local out_file="$out_dir/$src_file" $MKDIR "$out_dir/$(dirname "$src_file")" @@ -69,10 +69,9 @@ function generate() [ "$file_extension" != "$FORMAT" ] then out_file="$base_file.$FORMAT" - echo "$base_file" if [ "$src_file" -nt "$out_file" ] then - echo -e "Compressing \x1b[1m$src_file\x1b[0m" + echo -e "Converting \x1b[1m$src_file\x1b[0m" convert_image "$src_file" "$base_file" scale_image "$base_file" continue