Skip to content
Snippets Groups Projects
Commit 9047e907 authored by Dumez's avatar Dumez
Browse files

Bash read built-in function behaves differently with 0x0a symbols for bash >=4.3-alpha.

This fix accommodates the behavior of both versions
parent 929c9307
No related branches found
No related tags found
No related merge requests found
......@@ -121,9 +121,13 @@ echo "CONTENT BEGIN" >> ${quartusdir}/${project_rev}.mif
unb_info $0 "Writing ${quartusdir}/${project_rev}.reg contents to ${quartusdir}/${project_rev}.mif"
tr '\n' '\0' < ${quartusdir}/${project_rev}.reg > ${quartusdir}/${project_rev}.reg_tmp
cat ${quartusdir}/${project_rev}.reg_tmp > ${quartusdir}/${project_rev}.reg
rm -f ${quartusdir}/${project_rev}.reg_tmp
address=0
charcnt=0
while IFS= read -r -n1 char
while IFS= read -r -d $'\0' -n1 char
do
# 4 bytes per word address: print one address per 4 chars
if [ $charcnt -eq 0 ] ; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment