Wed 8 Nov 2006
Tired of typing the same formulaic SVK commands over and over again whenever I need to mirror another repository to my system (especially in the wake of several successive laptop failures), I whipped up this little bash script. I have christened it svk-init.
#!/bin/sh source=$1; short=$2; svk mirror $source //$short/main svk sync //$short/main svk cp //$short/main //$short/local -m "Creating //$short/local" svk co //$short/local ~/src/$short
The first parameter is the URL to mirror from, the second is a short name for the project. Usage goes something like this:
$ ./svk-init svn+ssh://somehost/var/svn/functional functional
When the script completes, I’ll be left with a working copy in my ~/src/functional/ directory.
Eventually, I’d like to make the short name optional, having the script deduce one for me if the second parameter is left unspecified.
November 9th, 2006 at 04:49
You can actually do svk cp $source ~/src/$short
and just answer a few questions.
November 15th, 2006 at 17:32
[…] When I posted the first version of svk-init, my handy-dandy SVK initialisation script, I mentioned that I wanted to have the script figure out the short name for me, based on the repository URL. Promises made, promises kept: […]