Skip to content

Commit

Permalink
make-single-file-spm: support lines ending in n (#1251)
Browse files Browse the repository at this point in the history
Motivation:

make-single-file-spm has a weird bug where it would chop off trailing
`n` characters in all lines due to a badly set `IFS` bash variable.

Modifications:

Set `IFS=""` which is correct.

Result:

make-single-file-spm will not chop off trailing `n`s.
  • Loading branch information
weissi committed Nov 18, 2019
1 parent ff01888 commit 9dd9f36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dev/make-single-file-spm
Expand Up @@ -151,7 +151,7 @@ all_dependencies=()
all_dependency_modules=()
number_of_lines=0

while IFS="\n" read -r line; do
while IFS="" read -r line; do
if [[ "$line" =~ ^//\ MODULE:\ (.*)$ ]]; then
module=${BASH_REMATCH[1]}

Expand Down

0 comments on commit 9dd9f36

Please sign in to comment.