unpack-channel.nix: fix 'mv' corner case
unpack-channel.nix fails if the tarball contains a directory named the same as the channel: mv: cannot move 'nixpkgs' to a subdirectory of itself, '.../nixpkgs' This commit fixes that by not moving the directory if it already has the correct name.
This commit is contained in:
parent
89ffe1eff9
commit
f72206b736
|
@ -15,7 +15,9 @@ let
|
|||
else
|
||||
${bzip2} -d < $src | ${tar} xf - ${tarFlags}
|
||||
fi
|
||||
if [ * != $channelName ]; then
|
||||
mv * $out/$channelName
|
||||
fi
|
||||
if [ -n "$binaryCacheURL" ]; then
|
||||
mkdir $out/binary-caches
|
||||
echo -n "$binaryCacheURL" > $out/binary-caches/$channelName
|
||||
|
|
Loading…
Reference in a new issue