[Libreoffice] [SCRIPT, EASYHACK] "add-modelines", a script to add modelines to source files

someone at boldandbusted.com someone at boldandbusted.com
Tue Oct 12 10:44:03 PDT 2010

On Tue, 12 Oct 2010 12:37 +0200, "Sebastian Spaeth"
<Sebastian at SSpaeth.de> wrote:
> On 2010-10-11, someone at boldandbusted.com wrote:
> > However, the script as I last sent it (version 0.7) works to cover the
> > original EasyHack spec.
> I ran v07 on the various git repos and attached the resulting git
> patches at https://bugs.freedesktop.org/show_bug.cgi?id=30794
> Please someone (I assigned to Kendy as per IRC discussion, so that would
> be him :-)) apply these patches.
> The script is fine, but my /bin/sh did not like "set -o posix" so I made
> it run as /bin/bash. Also the -z option would not add new modelines but
> really only overwrite existing ones spewing out lots of "mv... file not
> found" errors which puzzled me a lot.
> Otherwise it's an excellent piece of work :-). Please apply before the
> patches get old :).
> Sebastian

Hi Sebastian,

Sweet! Glad I could help. A couple questions:

* What shell environment were you running the script under which gave
you the -z option sadness?
* Did you commit my original unchanged version to git, then commit your
changes, or only commit the version with your changes (awk removal,
etc.) and not the original I posted? (I'd like to know that my original
version, warts and all, was committed for posterity. :) )
* Yah, sorry about the extra spaces. I actually meant to remove that. I
had that in so I could be sure that I wasn't damaging other data.
* If you see that "set -o posix" thing again, just remove it to run
under /bin/sh. The "set -o posix" actually makes Bash behave like
/bin/sh. I didn't know that /bin/sh would barf on it, so I'll consider
this command a "debugging" command.


Jesse Adelman
San Francisco, CA
Bold and Busted LLC

More information about the LibreOffice mailing list