okay,
now look at the second line in the sh script:
[tt]for i in src/*.inc src/*.asm src/*.h;[/tt]
that’s a loop and says {do something} in all files in the sub-directory src with the file-ending *.inc.
Now remember, that this script has been written to change the macros for the MIOS-sourcecode itself. You are using it for something else.
The error sais, that it can’t find a subfolder src.
Can you solve that by yourself? 
another hint: the same applies for files with the ending .h (header files) and the ending .asm
cheers,
Michael
ok removed “src/*” in the script
got this (I hope it’s ok?):
~/Desktop/midibox_sid_v1_7303b] nicolash% ./fix-gpasm.sh
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
sed: 1: replace-macros.sed: command i expects \ followed by text
[nicolas-hermansens-powerbook-g4-12:~/Desktop/midibox_sid_v1_7303b] nicolash%