From: Mathias Preiner Date: Mon, 24 Sep 2018 15:57:29 +0000 (-0700) Subject: Fix generating debug/trace tags. X-Git-Tag: cvc5-1.0.0~4523 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=87e6a08ff94c74d13453c76adaba8f729c7a958c;p=cvc5.git Fix generating debug/trace tags. --- diff --git a/src/base/genheader.sh b/src/base/genheader.sh index a4bff7306..2091f7781 100755 --- a/src/base/genheader.sh +++ b/src/base/genheader.sh @@ -11,11 +11,11 @@ shift tags_type="$1" # Debug/Trace tags_file="${tags_type}_tags" -if [ "${tags_type}" != "Debug" -a "${tags_type}" != "Trace" ]; then +if [ "${tags_type}" != "Debug" ] && [ "${tags_type}" != "Trace" ]; then echo "$0: Invalid tags type '${tags_type}' (must be 'Debug' or 'Trace')" exit 1 fi [ ! -e "${tags_file}" ] && echo "$0: ${tags_file} does not exist" && exit 1 -${path}/mktagheaders ${tags_file} ${tags_file} > ${tags_file}.h +"${path}/mktagheaders" "${tags_file}" "${tags_file}" > "${tags_file}.h" diff --git a/src/base/gentags.sh b/src/base/gentags.sh index 8c180e410..67888b3f5 100755 --- a/src/base/gentags.sh +++ b/src/base/gentags.sh @@ -11,7 +11,7 @@ tags_type="$1" # Debug/Trace tags_file="${tags_type}_tags" -if [ "${tags_type}" != "Debug" -a "${tags_type}" != "Trace" ]; then +if [ "${tags_type}" != "Debug" ] && [ "${tags_type}" != "Trace" ]; then echo "$0: Invalid tags type '${tags_type}' (must be 'Debug' or 'Trace')" exit 1 fi @@ -21,6 +21,6 @@ fi if [ -e "${tags_file}" ]; then # Do not update file if tags didn't change. - diff -q ${tags_file}.tmp ${tags_file} &> /dev/null && exit 0 + diff -q "${tags_file}.tmp" "${tags_file}" > /dev/null 2>&1 && exit 0 fi -mv ${tags_file}.tmp ${tags_file} +mv "${tags_file}.tmp" "${tags_file}" diff --git a/src/base/gentmptags.sh b/src/base/gentmptags.sh index 31404a16a..566fa1747 100755 --- a/src/base/gentmptags.sh +++ b/src/base/gentmptags.sh @@ -11,11 +11,11 @@ shift tags_type="$1" tags_file="${tags_type}_tags" shift -source_files_list="$@" +source_files_list="$*" -if [ "${tags_type}" != "Debug" -a "${tags_type}" != "Trace" ]; then +if [ "${tags_type}" != "Debug" ] && [ "${tags_type}" != "Trace" ]; then echo "$0: Invalid tags type '${tags_type}' (must be 'Debug' or 'Trace')" exit 1 fi -${path}/mktags ${tags_type} ${source_files_list} > ${tags_file}.tmp +"${path}/mktags" "${tags_type}" "${source_files_list}" > "${tags_file}.tmp"