about summary refs log tree commit diff
path: root/pkgs/build-support/fetchgit/builder.sh
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2011-08-31 18:12:33 +0000
committerShea Levy <shea@shealevy.com>2011-08-31 18:12:33 +0000
commit191a4c404ab57be4466e9b2d6ef25c6c77152602 (patch)
tree23000acd1260299138cdb9cf355ab0054ecfc783 /pkgs/build-support/fetchgit/builder.sh
parentf7f9b39450877382151dc0bdd10281404780f19f (diff)
parent04b1ac31da9885e3b1893a98e5280b8f9a039652 (diff)
svn path=/nixpkgs/branches/darwin-updates/; revision=28944
Diffstat (limited to 'pkgs/build-support/fetchgit/builder.sh')
-rw-r--r--pkgs/build-support/fetchgit/builder.sh23
1 files changed, 1 insertions, 22 deletions
diff --git a/pkgs/build-support/fetchgit/builder.sh b/pkgs/build-support/fetchgit/builder.sh
index ed3af4a7ab618..5c7d92698cc32 100644
--- a/pkgs/build-support/fetchgit/builder.sh
+++ b/pkgs/build-support/fetchgit/builder.sh
@@ -6,27 +6,6 @@ source $stdenv/setup
 
 header "exporting $url (rev $rev) into $out"
 
-git init $out
-cd $out
-git remote add origin "$url"
-git fetch --progress origin
-git remote set-head origin -a || (
-    test -n "$rev" && echo "that's ok, we want $rev" || exit 1)
-
-if test -n "$rev"; then
-    echo "Trying to checkout: $rev"
-    parsed_rev=$(
-        git rev-parse --verify "$rev" 2>/dev/null ||
-        git rev-parse --verify origin/"$rev" 2>/dev/null
-    ) 
-    git reset --hard $parsed_rev
-    git checkout -b __nixos_build__
-else
-    git checkout -b __nixos_build__ origin/HEAD
-fi
-
-if test -z "$leaveDotGit"; then
-    find $out -name .git\* | xargs rm -rf
-fi
+$fetcher --builder --url "$url" --out "$out" --rev "$rev" ${leaveDotGit:+--leave-dotGit}
 
 stopNest