+2020-04-29 Simon Marchi <simon.marchi@efficios.com>
+
+ * gdbarch.sh: Use double quotes around variables.
+
2020-04-29 Simon Marchi <simon.marchi@efficios.com>
* gdbarch.sh: Use %s with printf, instead of variables in the
compare_new ()
{
file=$1
- if test ! -r ${file}
+ if test ! -r "${file}"
then
echo "${file} missing? cp new-${file} ${file}" 1>&2
- elif diff -u ${file} new-${file}
+ elif diff -u "${file}" "new-${file}"
then
echo "${file} unchanged" 1>&2
else
line="`echo "${line}" | sed -e 's/;;/; ;/g' -e 's/;;/; ;/g'`"
OFS="${IFS}" ; IFS="[;]"
- eval read ${read} <<EOF
+ eval read "${read}" <<EOF
${line}
EOF
IFS="${OFS}"
# that ended up with just that space character.
for r in ${read}
do
- if eval test \"\${${r}}\" = \"\ \"
+ if eval test "\"\${${r}}\" = ' '"
then
- eval ${r}=""
+ eval "${r}="
fi
done
EOF
for r in ${read}
do
- eval echo \"\ \ \ \ ${r}=\${${r}}\"
+ eval echo "\" ${r}=\${${r}}\""
done
if class_is_predicate_p && fallback_default_p
then
printf "\n"
printf "void\n"
printf "set_gdbarch_%s (struct gdbarch *gdbarch,\n" "$function"
- printf " `echo ${function} | sed -e 's/./ /g'` gdbarch_%s_ftype %s)\n" "$function" "$function"
+ printf " `echo "$function" | sed -e 's/./ /g'` gdbarch_%s_ftype %s)\n" "$function" "$function"
printf "{\n"
printf " gdbarch->%s = %s;\n" "$function" "$function"
printf "}\n"
printf "\n"
printf "void\n"
printf "set_gdbarch_%s (struct gdbarch *gdbarch,\n" "$function"
- printf " `echo ${function} | sed -e 's/./ /g'` %s %s)\n" "$returntype" "$function"
+ printf " `echo "$function" | sed -e 's/./ /g'` %s %s)\n" "$returntype" "$function"
printf "{\n"
printf " gdbarch->%s = %s;\n" "$function" "$function"
printf "}\n"