mirror of
https://gitlab.com/xonotic/xonotic
synced 2025-01-31 02:32:16 +00:00
skip expensive hash-object calls where not needed
This commit is contained in:
parent
d1f465f3ec
commit
fc00291a3c
1
all
1
all
@ -1177,6 +1177,7 @@ case "$cmd" in
|
||||
fi
|
||||
done
|
||||
fi
|
||||
verbose export git_src_repo="$d0/$src" # skip hash-object
|
||||
verbose "$SELF" release-buildpk3-transform-$transform "Xonotic/temp"
|
||||
verbose zip -9yr "../../$dst" .
|
||||
verbose cd ../..
|
||||
|
@ -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 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
|
||||
|
Loading…
Reference in New Issue
Block a user