Browse Source

Merge pull request #39836 from thaJeztah/hack_linting_nits

hack/make/binary-daemon: fix some linting issues
Kirill Kolyshkin 6 năm trước cách đây
mục cha
commit
d99b0302d3
1 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. 5 5
      hack/make/binary-daemon

+ 5 - 5
hack/make/binary-daemon

@@ -15,16 +15,16 @@ copy_binaries() {
 	fi
 	echo "Copying nested executables into $dir"
 	for file in containerd containerd-shim ctr runc docker-init docker-proxy rootlesskit rootlesskit-docker-proxy dockerd-rootless.sh; do
-		cp -f `which "$file"` "$dir/"
-		if [ "$hash" == "hash" ]; then
+		cp -f "$(command -v "$file")" "$dir/"
+		if [ "$hash" = "hash" ]; then
 			hash_files "$dir/$file"
 		fi
 	done
 
 	# vpnkit is amd64 only
-	if which "vpnkit.$(uname -m)" 2>&1 >/dev/null; then
-		cp -f `which "vpnkit.$(uname -m)"` "$dir/vpnkit"
-		if [ "$hash" == "hash" ]; then
+	if command -v "vpnkit.$(uname -m)" 2>&1 >/dev/null; then
+		cp -f "$(command -v "vpnkit.$(uname -m)")" "$dir/vpnkit"
+		if [ "$hash" = "hash" ]; then
 			hash_files "$dir/vpnkit"
 		fi
 	fi