nix-prefetch-bzr: match path name to fetchbzr name

fetchbzr always uses the derivation name `bzr-export`. nix-prefetch-bzr
should use the same name for its output. This avoids duplicate downloads
and problems with forbidden characters in bazaar repository names.
This commit is contained in:
Thomas Tuegel 2015-12-18 15:48:38 -06:00
parent 55544c1e68
commit 0b1edac8c0

View File

@ -26,8 +26,7 @@ repoName=$(echo $url | sed '
s,.*/\([^/]\+\)/tags/\([^/]\+\)/*$,\1-\2,;t
s,.*/\([^/]\+\)/*$,\1,;t
')
dstFile=$repoName-r$rev
test -n "$rev" || dstFile=$repoName
dstFile="bzr-export"
# If the hash was given, a file with that hash may already be in the
# store.