hack/make/binary-daemon: fix some linting issues
- Add quotes to prevent word splitting in `cp` statement (SC2046)
- Replace legacy back tics with `$()`
- Replace `which` with `command -v` (SC2230)
- Fix incorrect (`==`) comparison
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 70d3677825
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
93b38b8008
commit
69da36f39e
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue