Added fetchcvs.

svn path=/nixpkgs/trunk/; revision=5295
This commit is contained in:
Roy van den Broek
2006-05-11 12:36:16 +00:00
parent 179e41fe9d
commit 9ece10787e
4 changed files with 133 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
source $stdenv/setup
header "exporting $url $module into $out"
prefetch=$(dirname $out)/cvs-checkout-tmp-$outputHash
echo $prefetch
if test -e "$prefetch"; then
mv $prefetch $out
else
if test -z "$tag"; then
rtag="-DNOW"
else
rtag="-r $tag"
fi
cvs -f -d $url export $rtag -d $out $module
fi
actual=$(nix-hash $out)
if test "$actual" != "$outputHash"; then
echo "hash is $actual, expected $outputHash" >&2
exit 1
fi
stopNest