fetchgitlocal: don't force copying the whole source directory into the store..

This commit is contained in:
Eric Seidel 2015-03-28 13:13:18 -07:00
parent da73e45cd0
commit 1a68f81db4

View File

@ -1,10 +1,10 @@
{ runCommand, git }: src:
runCommand "local-git-export" {} ''
cd ${src}
cd ${toString src}
mkdir -p "$out"
for file in $(${git}/bin/git ls-files); do
mkdir -p "$out/$(dirname $file)"
cp -d $file "$out/$file"
cp -d $file "$out/$file" || true # don't fail when trying to copy a directory
done
''