void-bash-installer/modules/20-installation/install
2021-03-16 22:52:43 +01:00

29 lines
580 B
Plaintext

module start "installation" "Installation" "dontcheck"
if [[ "${#ignorepkg[@]}" -gt 0 ]]; then
mkdir -p /etc/xbps.d/
touch /etc/xbps.d/10-ignore-pkg.conf
for ig in "${ignorepkg[@]}"; do
if ! grep -q "${ig}" /etc/xbps.d/10-ignore-pkg.conf; then
echo "ignorepkg=${ig}" >> /etc/xbps.d/10-ignore-pkg.conf
fi
done
fi
for i in ${pkg[@]}; do
for j in ${removepkg[@]}; do
if [[ "${i}" == "${j}" ]]; then
continue 2
fi
done
toinstall+=( "$i" )
done
if [[ "${#toinstall[@]}" -gt 0 ]]; then
xbps-install -Sy "${toinstall[@]}"
else
echo nothing to do
fi
module end