X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=misc%2Ftools%2Fcached-converter.sh;h=0bd61fdcd06aa8d913fed0b7ab18b0ebc624f27d;hb=f3922b7a08f53c82092930237c249064ed47ecaf;hp=72f427c71d89bf150ac23dd4a4a40ba36431c74f;hpb=5050382ea259ff33953768a43e9c341960e34c1d;p=xonotic%2Fxonotic.git diff --git a/misc/tools/cached-converter.sh b/misc/tools/cached-converter.sh index 72f427c7..0bd61fdc 100755 --- a/misc/tools/cached-converter.sh +++ b/misc/tools/cached-converter.sh @@ -12,6 +12,7 @@ set -e : ${do_ogg:=false} : ${ogg_qual:=1} : ${del_src:=false} +: ${git_src_repo:=} me=$0 case "$me" in @@ -47,9 +48,16 @@ cached() 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 --revs-only HEAD:"${infile1#./}" | grep . ) || git hash-object "$infile1"` + if [ -n "$infile2" ]; then + sum=$sum`( cd "$git_src_repo"; git rev-parse --revs-only HEAD:"${infile2#./}" | grep . ) || git hash-object "$infile2"` + fi + else + sum=`git hash-object "$infile1"` + if [ -n "$infile2" ]; then + sum=$sum`git hash-object "$infile2"` + fi fi lastinfileshash=$sum fi @@ -179,6 +187,7 @@ for F in "$@"; do case "$f" in *_bump) will_dds=false ;; ./models/player/*) will_dds=false ;; + ./models/sprites/*) will_dds=false ;; ./textures/*) ;; ./models/*) ;; ./particles/*) ;;