Headache breaks shell script files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
headache (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
This seems to have been covered by a previous bug, see https:/
However in the current headache (1.03-25) this is not the case.
The patch 02_skip_begin is mentioned at revision 1.03-13 but there is no diff and AFAIK no public repository going back that far.
Running headache on a file with a shebang '#!' places the copyright message at the start of the file, rather than after the shebang line. For some shells this breaks the script.
My workround is a sed script that looks for shebang start of the file and fixes it up after headache has done it's thing, this leaves 'dead' shebangs in the file but as they are not the first line they have no effect.
The 'skip' feature is still there in 1.03-24. This is how you protect a shebang of a python script:
| ".*\\.py" -> frame open:"#" line:"#" close:"#"
| ".*\\.py" -> skip match:"#!.*"
I believe we can close this bug.