I have scripts like this
#!/bin/sh
SHELL_CMD=busybox
and try to substitute some pattern to bash shell using makefile,
#!/bin/bash
#SHELL_CMD=busybox
Followings are the procedures in Makefile
release:
    @rm -rf my_temp/
    @mkdir my_temp/
    @cp dir1/burn_*.sh dir1/dump_*.sh my_temp/
    @cd my_temp/; \
        for f in $(shell ls); do \
            sed 's:#!/bin/sh\nSHELL_CMD=busybox:#!/bin/bash\n#SHELL_CMD=busybox:1' $${f} > temp; mv temp $${f}; \
        done; \
        cd ..;
    @cd my_temp/; tar -jcv -f bash.tar.bz2 *.sh; cd ..;
My questions are:
1 in the for loop, it didn't get the correct script names in for loop. How to patch it ?
- Any better patterns in this sed substitution?
 
    