rcsync - Synchronize configuration files across machines
base_dir /home/supermario/rcsync <vim> filename /home/supermario/.vimrc template vimrc.tt <params> backupdir /tmp/vim </params> </vim>
set nocompatible set backup set backupdir=[% backupdir %] ...
From the command line:
rcsync is a script to assist in synchronizing configuration files across different machines. Create templates for the configuration files you want synchronized, using template variables whereever you have machine-specific settings. Keep this folder synchronized across machines using whatever tool you choose - a version control system, a file syncing service such as Dropbox, rsync, etc. In a
$HOME/.rcsync configuration file specify the directory with sycnronized templates as
base_dir, and then for each configuration file (a.k.a. profile) create a section with the following parameters:
filename - the location of the config file that needs syncing (i.e. the filename where the processed template will be written),
template - the name of the tempalte to be used for this configuration file (under
params - a block of parameter to be passed to the template. Run
rcsync profile1 profile2 ... to sync the specified profiles. Template::Toolkit is used for template processing, and the settings (
.rcsync) are in Config::General format.
Sync all profiles
List the names of all profiles
Print the path to the template for the specified profile
Specify a configuration file to use
Create a stub configuration file in <$HOME/.rcsync> if one does not exist yet
Print processed templates to STDOUT rather than to a file
Display a help message
This is an experimental module. New features will be added, such as syncing of multiple files per profile, and the API and configuration file syntax may need to change. So, before we hit version 1.0, make sure to read the
Changes file before upgrading.
Peter Shangov <pshangov at yahoo dot com>
This software is copyright (c) 2010 by Peter Shangov.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.