summary refs log tree commit diff
path: root/pkgs/build-support/fetchgit/builder.sh
diff options
context:
space:
mode:
authorRob Vermaas <rob.vermaas@gmail.com>2009-06-24 12:48:01 +0000
committerRob Vermaas <rob.vermaas@gmail.com>2009-06-24 12:48:01 +0000
commit205fb0c87eab5dd53c6a0e97b1ff0e48f141c902 (patch)
treecf1003bcaa9d1f67476ac40cc14d63d49a5c90c1 /pkgs/build-support/fetchgit/builder.sh
parentef83c754f685262502a70063035d3e72f93ec2ed (diff)
downloadnixlib-205fb0c87eab5dd53c6a0e97b1ff0e48f141c902.tar
nixlib-205fb0c87eab5dd53c6a0e97b1ff0e48f141c902.tar.gz
nixlib-205fb0c87eab5dd53c6a0e97b1ff0e48f141c902.tar.bz2
nixlib-205fb0c87eab5dd53c6a0e97b1ff0e48f141c902.tar.lz
nixlib-205fb0c87eab5dd53c6a0e97b1ff0e48f141c902.tar.xz
nixlib-205fb0c87eab5dd53c6a0e97b1ff0e48f141c902.tar.zst
nixlib-205fb0c87eab5dd53c6a0e97b1ff0e48f141c902.zip
* fetchgit and nix-prefetch-git
svn path=/nixpkgs/trunk/; revision=16035
Diffstat (limited to 'pkgs/build-support/fetchgit/builder.sh')
-rw-r--r--pkgs/build-support/fetchgit/builder.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/pkgs/build-support/fetchgit/builder.sh b/pkgs/build-support/fetchgit/builder.sh
new file mode 100644
index 000000000000..08a1cc5d3419
--- /dev/null
+++ b/pkgs/build-support/fetchgit/builder.sh
@@ -0,0 +1,13 @@
+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
+find $out -name .git\* | xargs rm -rf
+
+stopNest
+