+2020-03-27 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * create-version.sh: Resolve issues highlighted by shellcheck.
+
2020-03-20 Simon Marchi <simon.marchi@efficios.com>
* config.in: Re-generate.
target_alias="$3"
output="$4"
-rm -f version.c-tmp $output version.tmp
-date=`sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$/\1/p' $srcdir/../bfd/version.h`
-sed -e "s/DATE/$date/" < $srcdir/version.in > version.tmp
-echo '#include "gdbsupport/version.h"' >> version.c-tmp
-echo 'const char version[] = "'"`sed q version.tmp`"'";' >> version.c-tmp
-echo 'const char host_name[] = "'"$host_alias"'";' >> version.c-tmp
-echo 'const char target_name[] = "'"$target_alias"'";' >> version.c-tmp
-mv version.c-tmp $output
+rm -f version.c-tmp "$output" version.tmp
+date=$(sed -n -e 's/^.* BFD_VERSION_DATE \(.*\)$/\1/p' "$srcdir/../bfd/version.h")
+sed -e "s/DATE/$date/" < "$srcdir/version.in" > version.tmp
+{
+ echo '#include "gdbsupport/version.h"'
+ echo 'const char version[] = "'"$(sed q version.tmp)"'";'
+ echo 'const char host_name[] = "'"$host_alias"'";'
+ echo 'const char target_name[] = "'"$target_alias"'";'
+} >> version.c-tmp
+mv version.c-tmp "$output"
rm -f version.tmp