about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDomen Kožar <domen@enlambda.com>2017-02-27T12·12+0100
committerGitHub <noreply@github.com>2017-02-27T12·12+0100
commitf0bbd153c6e38b8334faa237e9741e5b7dd37e2f (patch)
treea3766cf745448fa52e795035d190092ce93be637
parent89ffe1eff946639aa2752177fcc5159b6926af70 (diff)
parentf72206b736e4fa1be010a05aa12fa57afea2019c (diff)
Merge pull request #1252 from bjornfor/channel-rename-fix
unpack-channel.nix: fix 'mv' corner case
-rw-r--r--corepkgs/unpack-channel.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/corepkgs/unpack-channel.nix b/corepkgs/unpack-channel.nix
index 9445532ded03..a654db40e62a 100644
--- a/corepkgs/unpack-channel.nix
+++ b/corepkgs/unpack-channel.nix
@@ -15,7 +15,9 @@ let
       else
         ${bzip2} -d < $src | ${tar} xf - ${tarFlags}
       fi
-      mv * $out/$channelName
+      if [ * != $channelName ]; then
+        mv * $out/$channelName
+      fi
       if [ -n "$binaryCacheURL" ]; then
         mkdir $out/binary-caches
         echo -n "$binaryCacheURL" > $out/binary-caches/$channelName