Commit 062a3f89 authored by Tobias Powalowski's avatar Tobias Powalowski
Browse files

stop if download fails

parent 5cc6eac5
......@@ -149,14 +149,14 @@ _install_archboot() {
if grep -qw archboot /etc/hostname; then
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -gt 3860000 ]]; then
echo "Downloading ${_ARCHBOOT} ${_GRAPHICAL_PACKAGES} to ${1} ..."
pacman --root "${1}" -Syw --dbpath "${1}"/blankdb ${_ARCHBOOT} ${_GRAPHICAL_PACKAGES} --config "${_PACMAN_CONF}" --ignore systemd-resolvconf --cachedir "${_CACHEDIR}" --noconfirm >/dev/null 2>&1
pacman --root "${1}" -Syw --dbpath "${1}"/blankdb ${_ARCHBOOT} ${_GRAPHICAL_PACKAGES} --config "${_PACMAN_CONF}" --ignore systemd-resolvconf --cachedir "${_CACHEDIR}" --noconfirm >/dev/null 2>&1 || exit 1
else
echo "Downloading ${_ARCHBOOT} to ${1} ..."
pacman --root "${1}" -Syw --dbpath "${1}"/blankdb ${_ARCHBOOT} --config "${_PACMAN_CONF}" --ignore systemd-resolvconf --cachedir "${_CACHEDIR}" --noconfirm >/dev/null 2>&1
pacman --root "${1}" -Syw --dbpath "${1}"/blankdb ${_ARCHBOOT} --config "${_PACMAN_CONF}" --ignore systemd-resolvconf --cachedir "${_CACHEDIR}" --noconfirm >/dev/null 2>&1 || exit 1
fi
else
echo "Downloading ${_ARCHBOOT} ${_GRAPHICAL_PACKAGES} to ${1} ..."
pacman --root "${1}" -Syw --dbpath "${1}"/blankdb ${_ARCHBOOT} ${_GRAPHICAL_PACKAGES} --config "${_PACMAN_CONF}" --ignore systemd-resolvconf --cachedir "${_CACHEDIR}" --noconfirm >/dev/null 2>&1
pacman --root "${1}" -Syw --dbpath "${1}"/blankdb ${_ARCHBOOT} ${_GRAPHICAL_PACKAGES} --config "${_PACMAN_CONF}" --ignore systemd-resolvconf --cachedir "${_CACHEDIR}" --noconfirm >/dev/null 2>&1 || exit 1
fi
echo "Installing ${_ARCHBOOT} to ${1} ..."
#shellcheck disable=SC2086
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment