trap 'exit 1' INT
trap 'rm -rf "$tmpdir"' EXIT
+lastinfiles=
+lastinfileshash=
cached()
{
flag=$1; shift
keep=true
fi
options=`echo "$*" | git hash-object --stdin`
- sum=`git hash-object "$infile1"`
- if [ -n "$infile2" ]; then
- sum=$sum`git hash-object "$infile2"`
+ if [ x"$infile1/../$infile2" = x"$lastinfiles" ]; then
+ sum=$lastinfileshash
+ else
+ sum=`git hash-object "$infile1"`
+ if [ -n "$infile2" ]; then
+ sum=$sum`git hash-object "$infile2"`
+ fi
+ lastinfileshash=$sum
fi
mkdir -p "$CACHEDIR/$method-$options"
name1="$CACHEDIR/$method-$options/$sum-1.${outfile1##*.}"
;;
*.png|*.tga)
cached true has_alpha "$F" "" "$F.hasalpha" ""
+ conv=false
if [ -s "$F.hasalpha" ]; then
cached "$do_dds" reduce_rgba_dds "$F" "" "dds/${F%.*}.dds" "" "$dds_flags"
cached "$do_jpeg" reduce_rgba_jpeg2 "$F" "" "${F%.*}.jpg" "${F%.*}_alpha.jpg" "$jpeg_qual_rgb" "$jpeg_qual_a"