darcspublish is a shell script that allows you to easily share your darcs repository between different computers, to give read access to the world, or to publish a website that is backed by a darcs repository on your computer. The project should work with any bourne shell and only needs darcs and sitecopy to work.
darcspublish reads it's configuration from the file .darcspublish in your home directory or _darcs/prefs/darcspublish in your darcs repository. Should you need different darcspublish “profiles” for one repository you can create different config files named _darcs/prefs/darcspublish.profile and when calling darcspublish you can name one or more profiles to upload as command line arguments. Should there exist more than one profile and you do not specify any profile, darcspublish will execute every one of them in alphabetical order.
The configuration file is a simple shell script that get's sourced by darcspublish. You can set the following variables:
The server to connect to.
The user name to use when connecting to the server.
The password to use for authentication when connecting to the server. As sitecopy (and therefore darcspublish) will use a password given in the ~/.netrc file, this setting is optional. In fact, UPLOADSTATE only works if is not set in the darcspublish configuration.
The directory to upload the contents of the repository into. This has to be an absolute path name and there's no excuse about it. If your omit DIR, darcspublish will assemble it from BASEDIR and the basename of the working directory.
The name of the destination directory's parent directory. This is useful to set in your ~/.darcspublish if you don't want to configure every single of your repositories and they all share the same base dir on the destination server.
Only upload the pristine tree. This is useful for deploying websites.
Example: PRISTINE=YES or PRISTINE=
Do not include the pristine tree when copying the repository. To save space on the destination site you may exclude the pristine tree, if the resulting repository will not be used as a working directory. (You probably will want to set this to YES)
Example: EXCLUDEPRISTINE=YES or EXCLUDEPRISTINE=
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 complete contents of the directories “_compile” and “_cache” (but these directories will be created on the destination site).
A metadata file will be saved at the destination site, which will allow you to upload from different locations. Before each sync darcspublish will check for a metadata file which will help darcspublish noticing which file is out of sync and needs to be updated.
Example: UPLOADSTATE=YES or UPLOADSTATE=
Ask before uploading.
Example: CAREFUL=YES or CAREFUL=