void-bash-installer/modules/20-installation/install

29 lines
580 B
Plaintext
Raw Normal View History

2021-03-11 14:04:04 +01:00
module start "installation" "Installation" "dontcheck"
2021-03-12 19:40:59 +01:00
2021-03-11 14:04:04 +01:00
if [[ "${#ignorepkg[@]}" -gt 0 ]]; then
2021-03-16 20:17:51 +01:00
mkdir -p /etc/xbps.d/
touch /etc/xbps.d/10-ignore-pkg.conf
2021-03-11 14:04:04 +01:00
for ig in "${ignorepkg[@]}"; do
2021-03-16 20:17:51 +01:00
if ! grep -q "${ig}" /etc/xbps.d/10-ignore-pkg.conf; then
echo "ignorepkg=${ig}" >> /etc/xbps.d/10-ignore-pkg.conf
2021-03-11 14:04:04 +01:00
fi
done
fi
2021-03-12 16:46:31 +01:00
for i in ${pkg[@]}; do
for j in ${removepkg[@]}; do
2021-03-12 16:48:31 +01:00
if [[ "${i}" == "${j}" ]]; then
2021-03-12 16:46:31 +01:00
continue 2
fi
done
toinstall+=( "$i" )
done
2021-03-12 17:05:15 +01:00
if [[ "${#toinstall[@]}" -gt 0 ]]; then
2021-03-16 20:29:58 +01:00
xbps-install -Sy "${toinstall[@]}"
2021-03-11 15:12:19 +01:00
else
echo nothing to do
fi
2021-03-11 14:04:04 +01:00
module end