This is the mail archive of the
mailing list for the Cygwin project.
Re: [Patch] g-b-s: New command: upgrade-self.
Bas van Gompel wrote:
I came up with the following, which should make upgrading easier in
the future. You'll still have to hand-merge this into your existing
scripts though, sorry, but from then on, non-conflicting updates to
g-b-s should be easily retrieved.
How it works: When invoked with the `upgrade-self' command, the script
attempts to get the HEAD-version from cvs, if it hasn't in the last
24 hours. This HEAD-version is invoked with the `version' command
to get it's CVS-revision. If it was just downloaded, the HEAD revision
is stored in /usr/share/gbs as generic-build-script-HEAD and
generic-build-script-<HEAD-revision> If the HEAD-revision doesn't
match this build-script's CVS-revision, the build-script's revision
is gotten from /usr/share/gbs if available, otherwise it is gotten
through CVS and stored in /usr/share/gbs. Than merging is done
on a copy of the build-script. If the merge has conflicts, one is
given the possibility to edit the script and the option to reject the
new script. Finally the new script is copied into place and executed
with the remaining parameters.
I like the idea having some semi-automatic function to update the build
- It should be in a separate script
is no big deal;-)
Note that "no merge conflict" does not imply "no problem", is does even
not imply "no syntax error".
So your new script may behave interesting, especially if the update-self
function has been updated self;-)
When updating several build scripts, this should be done by the same
current code, not by the possibly outdated and buggy code in the current
- It should be possible to update scripts from local directory (like
So the cvs update and merge part should be separate functions.
BTW: why not put g-b-s and such additional support scripts in a package?