mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
e10001042d
This makes it match the behaviour of fetchgit and fetchsvn, so it's easier to write scripts that support all of them.
20 lines
380 B
Bash
20 lines
380 B
Bash
source $stdenv/setup
|
|
|
|
tagtext=""
|
|
tagflags=""
|
|
if test -n "$rev"; then
|
|
tagtext="(tag $rev) "
|
|
tagflags="--tag=$rev"
|
|
elif test -n "$context"; then
|
|
tagtext="(context) "
|
|
tagflags="--context=$context"
|
|
fi
|
|
|
|
header "getting $url $partial ${tagtext} into $out"
|
|
|
|
darcs get --lazy $tagflags "$url" "$out"
|
|
# remove metadata, because it can change
|
|
rm -rf "$out/_darcs"
|
|
|
|
stopNest
|