diff options
Diffstat (limited to 'nixpkgs/pkgs/build-support/fetchcvs/builder.sh')
-rw-r--r-- | nixpkgs/pkgs/build-support/fetchcvs/builder.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/build-support/fetchcvs/builder.sh b/nixpkgs/pkgs/build-support/fetchcvs/builder.sh new file mode 100644 index 000000000000..7e4dde4a64c8 --- /dev/null +++ b/nixpkgs/pkgs/build-support/fetchcvs/builder.sh @@ -0,0 +1,26 @@ +if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi +source $stdenv/setup + +(echo "#!$SHELL"; \ + echo 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "$@"') > ssh +chmod +x ssh +export CVS_RSH=$PWD/ssh + +# creating the export drictory and checking out there only to be able to +# move the content without the root directory into $out ... +# cvs -f -d "$url" export $tag -d "$out" "$module" +# should work (but didn't - got no response on #cvs) +# See als man Page for those options + +mkdir -p export +if [ -n "$tag" ]; then + tag="-r $tag" +else + if [ -n "$date" ]; then + tag="-D $date" + else + tag="-D NOW" + fi +fi +(cd export && cvs -f -z0 -d "$cvsRoot" export $tag "$module") +mv export/* $out |