summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2018-09-24 08:57:29 -0700
committerMathias Preiner <mathias.preiner@gmail.com>2018-09-24 08:57:29 -0700
commit87e6a08ff94c74d13453c76adaba8f729c7a958c (patch)
tree13eba9fe3dd4f140a421fa81d202b3a411cfe2a5
parentfa2f106f94eb7914a463fb75dce09f9d26510616 (diff)
Fix generating debug/trace tags.
-rwxr-xr-xsrc/base/genheader.sh4
-rwxr-xr-xsrc/base/gentags.sh6
-rwxr-xr-xsrc/base/gentmptags.sh6
3 files changed, 8 insertions, 8 deletions
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"
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback