]> git.rm.cloudns.org Git - xonotic/mediasource.git/commitdiff
Minor tweaks to the minigame texture build script
authorMattia Basaglia <mattia.basaglia@gmail.com>
Thu, 5 Feb 2015 18:25:00 +0000 (19:25 +0100)
committerMattia Basaglia <mattia.basaglia@gmail.com>
Thu, 5 Feb 2015 18:25:00 +0000 (19:25 +0100)
gfx/minigames/build.sh

index 49e0e4aff2ebc31310b206b6528f39763dd69bb9..5e47774e51dba38cd99ba87bb52c95c5a50e295d 100755 (executable)
@@ -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