selectpackages() {
PACKAGELIST="$(echo 'steam
+libreoffice-fresh
+lutris
+steam
chromium
-thunar
-vim
-neovim
code
-simplescreenrecorder
+pcmanfm
obs-studio
-atom
krita
gimp
inkscape
-libreoffice-fresh
-libreoffice-still
audacity
virtualbox' | imenu -b 'select extra packages to install')"
-
- if [ -n "${PACKAGELIST[0]}" ]; then
- echo "Extra packages to install:"
- for i in ${PACKAGELIST[@]}; do
- echo " Package: $i"
- done
- iroot packages "$PACKAGELIST"
- else
- echo "No extra packages to install"
+ if [ -z "${PACKAGELIST[0]}" ]; then
+ echo "No extra packages to install"
+ return
+ fi
+
+ if grep 'steam' <<<"$PACKAGELIST"; then
+ PACKAGELIST="$PACKAGELIST
+steam-native-runtime"
+ fi
+
+ if grep 'lutris' <<<"$PACKAGELIST"; then
+ PACKAGELIST="$PACKAGELIST
+wine
+vulkan-tools"
fi
+
+ if grep 'virtualbox' <<<"$PACKAGELIST"; then
+ PACKAGELIST="$PACKAGELIST
+virtualbox-host-modules-arch"
+ fi
+
+ echo "adding extra packages to installation"
+ iroot packages "$PACKAGELIST"
+
}
chooselogs() {
plymouth
kernel
logging
-packages
+extra software
OK' | imenu -l 'select option')"
case "$CHOICE" in
autolog*)
logging)
chooselogs
;;
- packages)
- selectpackages
- ;;
+ "extra software")
+ selectpackages
+ ;;
OK)
echo "advanced options done"
exit
# choose wether to install grub and where to install it
choosegrub() {
- while [ -z $BOOTLOADERCONFIRM ]; do
+ while [ -z "$BOOTLOADERCONFIRM" ]; do
if ! imenu -c "install bootloader (grub) ? (recommended)"; then
if imenu -c "are you sure? This could make the system unbootable. "; then
iroot nobootloader 1
fi
# optional extra packages
-if iroot packages; then
+if iroot packages &>/dev/null; then
echo "installing extra packages"
- PACKAGES="$(iroot packages)"
- for t in ${PACKAGES[@]}; do
- case "$t" in
- steam)
- if command -v systemctl; then
- pacman -S --noconfirm --needed steam steam-native-runtime
- else
- echo "steam is not available on artix"
- fi
- continue
- ;;
- vim)
- pacman -S --noconfirm --needed vim vim-runtime
- continue
- ;;
- virtualbox)
- pacman -S --noconfirm --needed virtualbox-host-modules-arch virtualbox
- continue
- ;;
-
- pacman -S --noconfirm --needed ${t}
- done
+ if command -v systemctl; then
+ iroot packages | pacman -S --noconfirm --needed -
+ else
+ # steam is not in the artix repos
+ iroot packages | grep -v 'steam' | pacman -S --noconfirm --needed -
+ fi
fi
# artix packages