Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Commit a3edef2

Browse files
committed
gherkin: Use awk to remove BOM (sed trick doesn't work on OSX)
1 parent 8ec6632 commit a3edef2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ libs_so: ./include/rule_type.h src/parser.c src/dialect.c $(SRC_FILES) src/Makef
6767
# have mono, so we'll allow this line to fail.
6868
-mono berp/berp.exe -g gherkin.berp -t gherkin-c-rule-type.razor -o $@
6969
# Remove BOM
70-
sed '1s/^\xEF\xBB\xBF//' < $@ > $@.nobom
70+
awk 'NR==1{sub(/^\xef\xbb\xbf/,"")}{print}' < $@ > $@.nobom
7171
mv $@.nobom $@
7272

7373
src/parser.c: gherkin.berp gherkin-c-parser.razor
@@ -77,7 +77,7 @@ src/parser.c: gherkin.berp gherkin-c-parser.razor
7777
# have mono, so we'll allow this line to fail.
7878
-mono berp/berp.exe -g gherkin.berp -t gherkin-c-parser.razor -o $@
7979
# Remove BOM
80-
sed '1s/^\xEF\xBB\xBF//' < $@ > $@.nobom
80+
awk 'NR==1{sub(/^\xef\xbb\xbf/,"")}{print}' < $@ > $@.nobom
8181
mv $@.nobom $@
8282

8383
src/dialect.c: gherkin-languages.json dialect.c.jq

0 commit comments

Comments
 (0)