Skip to content

Commit 926eb96

Browse files
committed
fix sed command
1 parent 9ff3536 commit 926eb96

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/test-build-psoc6.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ jobs:
4343
- name: Patch cy_syslib.c to declare cy_delay32kMs
4444
run: |
4545
# Add extern declaration for cy_delay32kMs directly in cy_syslib.c
46-
sed -i '/#include "cy_syslib.h"/a \\\n/* Extern declaration for delay variable */\nextern uint32_t cy_delay32kMs;' lib/psoc6pdl/drivers/source/cy_syslib.c
46+
# Find the line with the include and add the extern declaration after it
47+
awk '/#include "cy_syslib.h"/ {print; print ""; print "/* Extern declaration for delay variable */"; print "extern uint32_t cy_delay32kMs;"; next} 1' \
48+
lib/psoc6pdl/drivers/source/cy_syslib.c > /tmp/cy_syslib_patched.c
49+
mv /tmp/cy_syslib_patched.c lib/psoc6pdl/drivers/source/cy_syslib.c
4750
4851
- name: Workaround for sources.list
4952
run: |

0 commit comments

Comments
 (0)