On 5/25/07, mpb <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I frequently need to generate patches as part of writing recipes.
> Typically I am setting the install paths to Gobo-appropriate values.
>
> I am wondering if Gobo has an autopatch tool that can automatically
> generate patches.
>
> Here is an example of how such a program would be used:
>
> cd Files/Compile/Sources/somedir
> cp somefile somefile.orig
> emacs somefile    # manually edit and save the file
> cd ..
> AutoPatch somedir
>
> AutoPatch would run find to find all *.orig files, and then diff them
> against the edited versions, writing the diff to stdout.
>
> Is there already a Gobo (or non-Gobo) tool that does this?  I thought
> I would ask before re-inventing the wheel.

No, there isn't anything like that yet. Just a few tips, if you're
going to write it yourself:
  - Please use the Scripts template, as seen in
/Programs/Scripts/Current/bin/TemplateScript
  - Use the $EDITOR variable instead of hardcoding emacs on your
script. If that variable is empty, then I'd suggest you to perform a
simple iteration over /Programs to select which editor to use (ie:
check for Emacs, MC and GVim and Vim to launch 'emacs', mcedit',
'gvim' and 'vim', respectively. If none are found, ask the user to set
$EDITOR on its $HOME/.profile).
  - Remember to allow more than one file to be specified in the
command line, as it's very usual to have patches composed by changes
to many files.

You could also require the source code to be uncompressed under
/Files/Compile/Sources. That will help a lot to find the program's
main directory, as there isn't a way to create a sane patch based on
'AutoPatch /Users/foo/mysources/program/subdir/subdir2/Makefile').

-- 
Lucas
powered by /dev/dsp
_______________________________________________
gobolinux-devel mailing list
gobolinux-devel@lists.gobolinux.org
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel

Reply via email to