sel=$(whiptail --backtitle "$apptitle" --title "System applications :" --checklist "Choose what you want" --cancel-button "Back" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ ! "$?" = "0" ]; then
exit 1
fi
for itm in $sel; do
case $itm in
'"octopi"' | \
'"appset-qt"' | \
'"pamac-aur"' | \
'"keepassx-git"' | \
'"k4dirstat"') aurpkg="$aurpkg $(echo $itm | sed 's/"//g')";;
'"wine"' | \
'"wine_gecko"')
multilib="true"
pkg="$pkg $(echo $itm | sed 's/"//g')"
;;
'"virtualbox-host-modules"')
pkg="$pkg virtualbox-host-dkms"
pkg="$pkg virtualbox-host-modules"
;;
*) pkg="$pkg $(echo $itm | sed 's/"//g')";;
esac
done
if [ "$multilib" = "true" ]; then
if ( confirm "To install wine or wine_gecko, multilib repo is requires.\nFor this, the script edit the [mulilib] part in /etc/pacman.conf and run pacman -Syu\n\nEnable multilib repo ?" ) then
sed -i '/\[multilib\]/s/^#//g' /etc/pacman.conf
sed -i '/\[multilib\]/{n;s/^#//g}' /etc/pacman.conf
pacman -Syu
else
exit 1
fi
fi
instpkg "$pkg" "$aurpkg"
for itm in $sel; do
case $itm in
'"virtualbox-host-dkms"')
if ( confirm "virtualbox-host-dkms require to rebuild initcpio.\n\nRun mkinitcpio -o linux ?" ) then