mirror of
https://github.com/opencontainers/runc.git
synced 2025-04-18 19:44:09 +03:00
script/setup_host_fedora.sh: use bash arrays
This makes the code more robust and allows to remove the "shellcheck disable=SC2086" annotation. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
a76a1361b4
commit
8e653e40c6
@ -1,12 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -eux -o pipefail
|
||||
DNF_OPTS="-y --setopt=install_weak_deps=False --setopt=tsflags=nodocs --exclude=kernel,kernel-core"
|
||||
RPMS="bats git-core glibc-static golang jq libseccomp-devel make"
|
||||
DNF=(dnf -y --setopt=install_weak_deps=False --setopt=tsflags=nodocs --exclude="kernel,kernel-core")
|
||||
RPMS=(bats git-core glibc-static golang jq libseccomp-devel make)
|
||||
# Work around dnf mirror failures by retrying a few times.
|
||||
for i in $(seq 0 2); do
|
||||
sleep "$i"
|
||||
# shellcheck disable=SC2086
|
||||
dnf $DNF_OPTS update && dnf $DNF_OPTS install $RPMS && break
|
||||
"${DNF[@]}" update && "${DNF[@]}" install "${RPMS[@]}" && break
|
||||
done
|
||||
dnf clean all
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user