I have an ebuild, which is binary and installs a couple of shell scripts in EPREFIX/opt/foo/scripts. It would be nice to have a variable to define dirs and/or files, which contains files to shebang fix.
hmmm, that wouldn't be too hard to implement. I take it the semantics would be that for each file (also dirs?) listed: - the shebang MUST be fixable, or - the shebang MUST be already ok - otherwise the ebuild dies (like it does for scripts in $PATH) Any suggestions for a variable that does this?
(In reply to comment #1) > hmmm, that wouldn't be too hard to implement. > > I take it the semantics would be that for each file (also dirs?) listed: > - the shebang MUST be fixable, or > - the shebang MUST be already ok > - otherwise the ebuild dies (like it does for scripts in $PATH) > > Any suggestions for a variable that does this? > EEXTRA_SHEBANG ? being a list (array?) or files and/or dirs.
(In reply to comment #2) > (In reply to comment #1) > > hmmm, that wouldn't be too hard to implement. > > > > I take it the semantics would be that for each file (also dirs?) listed: > > - the shebang MUST be fixable, or > > - the shebang MUST be already ok > > - otherwise the ebuild dies (like it does for scripts in $PATH) > > > > Any suggestions for a variable that does this? > > > > EEXTRA_SHEBANG ? being a list (array?) or files and/or dirs. > List or array depends on the best way for implementation. But I would suggest support for files and dirs, as well as wildcards. If possible
maybe it's much cleaner to just implement this in prefix.eclass as some "convert shebang" func.
prefix.eclass is the place to do hacky stuff like this.