]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/cached-converter.sh
Merge remote branch 'origin/master' into divVerent/crypto2
[xonotic/xonotic.git] / misc / tools / cached-converter.sh
index 0eab3d6946f5ae9fc10048afd7704ffb38a35c97..0bd61fdcd06aa8d913fed0b7ab18b0ebc624f27d 100755 (executable)
@@ -49,9 +49,9 @@ cached()
                sum=$lastinfileshash
        else
                if [ -n "$git_src_repo" ]; then
-                       sum=`( cd "$git_src_repo"; git rev-parse HEAD:"$infile1" )`
+                       sum=`( cd "$git_src_repo"; git rev-parse --revs-only HEAD:"${infile1#./}" | grep . ) || git hash-object "$infile1"`
                        if [ -n "$infile2" ]; then
-                               sum=`( cd "$git_src_repo"; git rev-parse HEAD:"$infile2" )`
+                               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"`