From: Lyberta Date: Thu, 28 Sep 2017 06:49:16 +0000 (+0300) Subject: Fixed genmod.sh X-Git-Tag: xonotic-v0.8.5~2458^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F498%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Fixed genmod.sh --- diff --git a/qcsrc/tools/genmod.sh b/qcsrc/tools/genmod.sh index 1c0eadcbe..a8ac4a0e8 100755 --- a/qcsrc/tools/genmod.sh +++ b/qcsrc/tools/genmod.sh @@ -13,10 +13,14 @@ function hash() { function genmod() { # use context to work around cmake issue #12619 CTX="${PWD#$ROOT}/" - oldHashC=$(hash ${MOD}.inc) - oldTimeC=$(stat -c "%Y" ${MOD}.inc) - oldHashH=$(hash ${MOD}.qh) - oldTimeH=$(stat -c "%Y" ${MOD}.qh) + if [ -f ${MOD}.inc ]; then + oldHashC=$(hash ${MOD}.inc) + oldTimeC=$(stat -c "%Y" ${MOD}.inc) + fi + if [ -f ${MOD}.qh ]; then + oldHashH=$(hash ${MOD}.qh) + oldTimeH=$(stat -c "%Y" ${MOD}.qh) + fi echo '// generated file; do not modify' > ${MOD}.inc echo '// generated file; do not modify' > ${MOD}.qh for f in $(ls | sort -k 1,1 -t .); do