about summary refs log tree commit diff
path: root/nixpkgs/pkgs/build-support/fetchcvs/builder.sh
blob: 4b49e9676ec02681f9d3849ffaf79e7b9ab8b8f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
if [ -e .attrs.sh ]; then source .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