Headache breaks shell script files

Bug #1704190 reported by Jason Morgan
6
This bug affects 1 person
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://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440442
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.

Revision history for this message
Dawid Toton (d0) wrote :

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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.