浏览代码

Force copy on make install to avoid Text file busy error

Signed-off-by: Christophe Mehay <cmehay@online.net>
Christophe Mehay 8 年之前
父节点
当前提交
01273ad85f
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      hack/make.sh

+ 2 - 2
hack/make.sh

@@ -237,7 +237,7 @@ copy_binaries() {
 		if [ -x /usr/local/bin/docker-runc ]; then
 		if [ -x /usr/local/bin/docker-runc ]; then
 			echo "Copying nested executables into $dir"
 			echo "Copying nested executables into $dir"
 			for file in containerd containerd-shim containerd-ctr runc init proxy; do
 			for file in containerd containerd-shim containerd-ctr runc init proxy; do
-				cp `which "docker-$file"` "$dir/"
+				cp -f `which "docker-$file"` "$dir/"
 				if [ "$2" == "hash" ]; then
 				if [ "$2" == "hash" ]; then
 					hash_files "$dir/docker-$file"
 					hash_files "$dir/docker-$file"
 				fi
 				fi
@@ -252,7 +252,7 @@ install_binary() {
 	if [ "$(go env GOOS)" == "linux" ]; then
 	if [ "$(go env GOOS)" == "linux" ]; then
 		echo "Installing $(basename $file) to ${target}"
 		echo "Installing $(basename $file) to ${target}"
 		mkdir -p "$target"
 		mkdir -p "$target"
-		cp -L "$file" "$target"
+		cp -f -L "$file" "$target"
 	else
 	else
 		echo "Install is only supported on linux"
 		echo "Install is only supported on linux"
 		return 1
 		return 1