3
0
Fork 0
forked from mirrors/nixpkgs

pkgs/applications/version-management/git-and-tools/git: fixed the build to deal with names that contain whitespace

The "find -print | while read" loop failed to deal with paths that contain
whitespace. Instead, we now use a similar construct that's based on globbing.

svn path=/nixpkgs/trunk/; revision=25454
This commit is contained in:
Peter Simons 2011-01-07 11:03:57 +00:00
parent 167f185411
commit f989b670d6

View file

@ -113,7 +113,9 @@ stdenv.mkDerivation rec {
# This reduces the size of $out from 115MB down to 13MB on x86_64-linux!
+ ''#
declare -A seen
find $out -type f | while read f; do
shopt -s globstar
for f in "$out/"**; do
test -f "$f" || continue
sum=$(md5sum "$f");
sum=''\${sum/ */}
if [ -z "''\${seen["$sum"]}" ]; then