[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CVS for System Administration and Configuration Restoral
From: |
Eugene Kramer |
Subject: |
Re: CVS for System Administration and Configuration Restoral |
Date: |
Sat, 14 Oct 2000 04:54:07 -0000 |
User-agent: |
eGroups-EW/0.82 |
--- In address@hidden, Garth Winter Webb <address@hidden> wrote:
> On Fri, 13 Oct 2000, Greg A. Woods wrote:
> >
> > However I would *STRONGLY* advise against trying to use CVS to
track and
> > manage system configurations and I would *NEVER* use it to
propogate
> > system configurations.
>
> I would have to agree.
Of course, it is possible to manage configurations with a combination
of CVS and Gnu make. This sample makefile allows you to collect files
before checking them into CVS (make import) and to install them (make
install):
============= same Makefile =======
TO1 := /tmp/dest
FROM1 := .
SRC1 := foo bar
ifdef import
import: $(patsubst %, $(FROM1)/%, $(SRC1))
$(FROM1)/%: $(TO1)/%
cp $< $@
endif
ifdef install
install: $(patsubst %, $(TO1)/%, $(patsubst %.src,%, $(SRC1)))
$(TO1)/%: $(FROM1)/%
cp $< $@
endif
ifndef NOGLOB
%:
@$(MAKE) NOGLOB=1 address@hidden $@
endif
Of course, you'd want to check if the file is writable before you
overwrite it.
Eugene.