Re: Newbie question, versioning configuration files
Bram Moolenaar <[email protected]>
| Newsgroups | gmane.comp.tools.aap.user |
|---|---|
| Message-ID | <[email protected]> |
Kent Tenney wrote:
> I want to put some configuration files under
> version control.
>
> All the descriptions of CVS usage I've seen
> keep working copies of files together, somewhere
> like ~/cvs/config
>
> I'd like a recipe which keeps the copy of a file
> in the CVS working directory in synch with the
> "real" file.
>
> IE: /etc/profile has a copy in ~/cvs/config/profile.
> When I do
> # cvs commit
> in /cvs/config, I want the recipe to check
> if /etc/profile is newer than ~/cvs/config/profile,
> and update the versioned copy before commiting to cvs.
>
> In reading the doc it seems that there are a number
> of ways this could be done...
>
> Please point me in the right direction.
There are indeed several methods to do this.
If you want to explicitly name the files, and there are just a few, you
can use dependencies:
profile : /etc/profile
:copy {force} $source $target
For a large number of files a rule could be used:
%file% : /etc/%file%
:copy {force} $source $target
Then you should somehow specify which files you want locally. To use
the existing files:
all : *
That's a bit dangerous though, because it might copy more than you
intended. You'll have to decide what files you want to copy.
(I didn't try the examples above...)
--
hundred-and-one symptoms of being an internet addict:
132. You come back and check this list every half-hour.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click