: ${do_ogg:=false}
: ${ogg_qual:=1}
: ${del_src:=false}
+: ${git_src_repo:=}
me=$0
case "$me" in
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"`
+ if [ -n "$git_src_repo" ]; then
+ sum=`( cd "$git_src_repo"; git rev-parse HEAD:"$infile1" )`
+ if [ -n "$infile2" ]; then
+ sum=`( cd "$git_src_repo"; git rev-parse HEAD:"$infile2" )`
+ fi
+ else
+ sum=`git hash-object "$infile1"`
+ if [ -n "$infile2" ]; then
+ sum=$sum`git hash-object "$infile2"`
+ fi
fi
lastinfileshash=$sum
fi
{
i=$1; shift; shift
o=$1; shift; shift
+ tags=`vorbiscomment -R -l "$i"`
oggdec -o "$tmpdir/x.wav" "$i" && \
oggenc -q"$1" -o "$o" "$tmpdir/x.wav"
+ echo "$tags" | vorbiscomment -R -w "$o"
}
reduce_wav_ogg()
i=$1; shift; shift
o=$1; shift
oa=$1; shift
- convert "$i" -alpha extract -quality 100 "$o" && \
- convert "$i" -alpha off -quality 100 "$oa" && \
+ convert "$i" -alpha off -quality 100 "$o" && \
+ convert "$i" -alpha extract -quality 100 "$oa" && \
jpegoptim --strip-all -m"$1" "$o" && \
jpegoptim --strip-all -m"$2" "$oa"
}
will_jpeg=$do_jpeg
will_dds=$do_dds
case "$f" in
+ *_bump) will_dds=false ;;
+ ./models/player/*) will_dds=false ;;
+ ./models/sprites/*) will_dds=false ;;
./textures/*) ;;
./models/*) ;;
- ./maps/*/*) ;;
./particles/*) ;;
./progs/*) ;;
*)
if [ -f "dds/${f}.dds" ]; then
if [ -z "${f##./textures/*}" ]; then
if [ -n "${f##./textures/*/*}" ]; then
- ln -snf "textures/${f%./textures/}.dds" "dds/${f%./textures/}.dds"
+ ln -snf "textures/${f#./textures/}.dds" "dds/${f#./textures/}.dds"
fi
fi
fi