darcspublish, a shell script, simplifies sharing of darcs repository across multiple devices.
The .darcspublish file in your home directory, or _darcs/prefs/darcspublish in your darcs repository, is where darcspublish obtains its configuration settings. If you require different darcspublish "profiles" for a single repository, you can generate separate config files named _darcs/prefs/darcspublish.profile. When you execute darcspublish, you can specify one or several profiles to upload as command line arguments. If there is more than one profile present and you do not identify one, darcspublish will run through all of them in alphabetical order.
The configuration file is a straightforward shell script that is sourced by darcspublish. The following variables can be set:
- SERVER: The server to connect to. Example: SERVER=ftp.burningsoda.com
- USER: The username to utilize when connecting to the server. Example: USER=rob
- PASSWORD: The authentication password to employ when connecting to the server. This setting is optional since sitecopy (and thereby darcspublish) will utilize a password specified in the ~/.netrc file. UPLOADSTATE will only function if it is not set in the darcspublish configuration. Example: PASSWORD=myverysecretsecret
- DIR: The repository's contents are uploaded into this directory. It must be an absolute pathname, and there are no exceptions. If you leave out DIR, darcspublish will create it from BASEDIR and the working directory's basename. Example: DIR=/var/darcs/myproject
- BASEDIR: The destination directory's parent directory's name. If you don't want to configure every one of your repositories, this is useful to set in your ~/.darcspublish, particularly if they all share the same base directory on the destination server. Example: BASEDIR=/var/darcs
- PRISTINE: Only upload the pristine tree. This is particularly useful for deploying websites. Example: PRISTINE=YES or PRISTINE=
- EXCLUDEPRISTINE: When copying the repository, do not include the pristine tree. If the resulting repository will not be used as a working directory, you may exclude the pristine tree to save space on the destination site. (You will probably want to set this to YES.) Example: EXCLUDEPRISTINE=YES or EXCLUDEPRISTINE=
- EXCLUDE: List of files or directories to exclude from uploading. Example: EXCLUDE="data _compile/* _cache/*" will not upload the directory (or file) "data" and will also exclude the entire contents of the directories "_compile" and "_cache" (although these directories will be created on the destination site).
- UPLOADSTATE: A metadata file will be saved on the destination site, enabling you to upload from various locations. Before each sync, darcspublish will check for a metadata file that will assist it in detecting which file is out of sync and requires updating. Example: UPLOADSTATE=YES or UPLOADSTATE=
- CAREFUL: Ask before uploading. Example: CAREFUL=YES or CAREFUL=
Version 1.0: N/A