Table of Contents
httpup is a simple program to synchronize data in one direction. It uses HTTP as transport, using libcurl as backend.
If you just like to synchronize a httpup-collection, it should be enough to read the next section only.
Obviously you need to have a working installation of httpup.
To synchronize a httpup repository with a local directory, just pass those two arguments to the httpup command:
$ httpup URL target-directory |
To create repository, either run httpup-repgen in the directory where your repository is, or pass an additional parameter where httpup-repgen should create a repository.
$ httpup-repgen [directory] |
To avoid inclusion of certain files in the repository, httpup-repgen has a mechanism to ignore certain file patterns. It checks two files for ignore expressions: first .httpup-repgen-ignore in the repository base directory, then $HOME/.httpup-repgen-ignore. These files can contain regular expressions which will be fed to grep(1) to filter out matches. If for example you'd like to ignore all files ending on '.tar.gz', you'd add the following to your .httpup-ignore-expression:
\.tar\.gz$ |
Every line can contain one expression, so in the end, a typical ignore file might look like the following:
\.svn$ \.tar\.gz$ \.tgz$ \.tar\.bz2$ \.zip$ ^CVS$ ^.*/CVS$ /CVS/.* ^CVS/.* .*~$ |
The ignore file is ignored automatically.
While this is no requirement, the following setup has proven to help avoiding errors during ports publication: First of all, define a location where your ports live in your local file system (I keep mine in $HOME/build/upload). Define some ignore expressions (see the previous paragraph for more information), to make sure you're only including the files you really want. You may keep this directory under revision control, e.g. using CVS, subversion, monotone etc.
Second, choose a tool to syncronize this repository to the remote server. There are a few tools available with support for different network protocols: rsync, unison, weex. There's also a dedicated tool called htup written by Nick Steves which automates those steps.
# # /etc/ports/jw.httpup: Johannes Winkelmann's port collection # ROOT_DIR=/usr/ports/jw URL=http://www.hta-bi.bfh.ch/~winkj/files/crux/ports-httpsync/ # End of file |