From 4582dc5bb2e749df40052761749e15043e3f9010 Mon Sep 17 00:00:00 2001 From: drjaska Date: Thu, 22 Aug 2024 07:16:57 +0300 Subject: [PATCH] Fix quoting issues --- qcsrc/tools/genmod.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qcsrc/tools/genmod.sh b/qcsrc/tools/genmod.sh index c9874dbb5..0d3f0339b 100755 --- a/qcsrc/tools/genmod.sh +++ b/qcsrc/tools/genmod.sh @@ -6,19 +6,19 @@ export LC_ALL=C.UTF-8 # This script creates / updates the _mod.qc / _mod.qh / _mod.inc files based on # the qc / qh files present in the qcsrc folder. -cd ${0%/*} +cd "${0%/*}" cd .. ROOT=$PWD/ MOD=_mod function hash() { - git hash-object $1 + git hash-object "$1" } function genmod() { # use context to work around cmake issue #12619 - CTX="${PWD#$ROOT}/" + CTX="${PWD#"$ROOT"}/" if [ -f ${MOD}.inc ]; then oldHashC=$(hash ${MOD}.inc) oldTimeC=$(stat -c "%Y" ${MOD}.inc) @@ -57,9 +57,9 @@ function genmod() { fi fi; done newHashC=$(hash ${MOD}.inc) - if [[ $newHashC == $oldHashC ]]; then touch -d @$oldTimeC ${MOD}.inc; fi + if [[ $newHashC == "$oldHashC" ]]; then touch -d @"$oldTimeC" ${MOD}.inc; fi newHashH=$(hash ${MOD}.qh) - if [[ $newHashH == $oldHashH ]]; then touch -d @$oldTimeH ${MOD}.qh; fi + if [[ $newHashH == "$oldHashH" ]]; then touch -d @"$oldTimeH" ${MOD}.qh; fi } (cd lib; genmod) -- 2.39.2