Re: Deploying VCS-controlled files to home directory

2008-06-30 Thread Michael Stillwell
On Sun, Jun 22, 2008 at 11:15 AM, Ben Finney <[EMAIL PROTECTED]> wrote:

> My question is: What strategy would you advise to automate deployment
> of this to a new machine, and to deploy updates on existing machines
> when it changes in the VCS?

I don't have host-specific application config files, but I do have
host-specific config files for bash.

I manage this via cascading through increasingly specific generic
configuration files, OS configuration files and finally host
configuration files:

sourceif "$CONFIG/$OS/config"
sourceif "$CONFIG/$OS/$PLATFORM/config"
sourceif "$CONFIG/$OS/$PLATFORM/$HOSTNAME/config"

(I have a similar cascade for setting the path.)

sourceif sources the file if it exists, and is merely:

function sourceif {
if [ -f "$1" ]; then
source "$1"
fi
}

The other environment variables are as follows:

export CONFIG="$HOME/.config"

export OS='unix'
export PLATFORM=`"$HOME/.platform"`
export HOSTNAME=`hostname | tr '.' ' ' | awk '{ print $1 }'`

($HOME/.platform is essentially `uname -s`, regularised a little.)

I thought this was going to be too simplistic when I set it up about
10 years ago, and that I'd have to implement something more
sophisticated at some point, but it's survived a whole heap of systems
without major change.  The tree currently looks like this:

unix/alpha
unix/cygwin/clem
unix/cygwin
unix/darwin/boom
unix/darwin/hector
unix/darwin/mop
unix/darwin
unix/decstation
unix/freebsd/bruce
unix/freebsd/saga
unix/freebsd
unix/linux/bund
unix/linux/catalina
unix/linux/mel
unix/linux/normand
unix/linux/rag
unix/linux
unix/osf
unix/sgi
unix/sunos/cms
unix/sunos/jumbo
unix/sunos/sng
unix/sunos
unix

My application-specific configuration files are in ~/.config/home, and
are symlinked into the root.




Cheers,
Michael

-- 
http://beebo.org
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home


Re: Deploying VCS-controlled files to home directory

2008-06-23 Thread Ben Finney
Maximilian Gass <[EMAIL PROTECTED]> writes:

> On Sun, Jun 22, 2008 at 08:15:41PM +1000, Ben Finney wrote:
> > My question is: What strategy would you advise to automate
> > deployment of this to a new machine, and to deploy updates on
> > existing machines when it changes in the VCS?
> 
> I use the script bootstrap-home which works with prep-home and
> symlink-dirs which you can find at
> http://git.cloudconnected.org/~mxey/bin/tree

Thanks. I've taken that as inspiration and written my own.

The current version is attached to this message (it lives on my
machine at '$HOME/.roam/bin/prep-home'). I describe how I use it at
http://vcs-home.madduck.net/RoamingProfile>.


-- 
 \  "Saying that Java is nice because it works on all OSes is like |
  `\ saying that anal sex is nice because it works on all genders" |
_o__)—http://bash.org/ |
Ben Finney
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home

Re: Deploying VCS-controlled files to home directory

2008-06-22 Thread Maximilian Gass
On Sun, Jun 22, 2008 at 08:15:41PM +1000, Ben Finney wrote:
> My question is: What strategy would you advise to automate deployment
> of this to a new machine, and to deploy updates on existing machines
> when it changes in the VCS?

I use the script bootstrap-home which works with prep-home and
symlink-dirs which you can find at
http://git.cloudconnected.org/~mxey/bin/tree

Currently I pull the repos by hand and then run prep-home to update, but
I consider doing that via cron.
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home