summary refs log tree commit diff
path: root/pkgs/build-support/fetchgit/builder.sh
blob: ba06aed90e18d8fbeaccbb0c7af3f0435962253a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
source $stdenv/setup

header "exporting $url (rev $rev) into $out"

git clone "$url" $out
if test -n "$rev"; then
  cd $out
  git checkout $rev
fi

if test -z "$leaveDotGit"; then
    find $out -name .git\* | xargs rm -rf
fi

stopNest