OSDN Git Service

add extra packages selection
authorpaperbenni <paperbenni@gmail.com>
Wed, 8 Jul 2020 12:59:38 +0000 (14:59 +0200)
committerpaperbenni <paperbenni@gmail.com>
Wed, 8 Jul 2020 12:59:38 +0000 (14:59 +0200)
askadvanced.sh
askdisk.sh
depend/system.sh

index 121f1bc..58baeb7 100644 (file)
@@ -32,32 +32,43 @@ default' | imenu -l 'select kernel')"
 
 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() {
@@ -73,7 +84,7 @@ while :; do
 plymouth
 kernel
 logging
-packages
+extra software
 OK' | imenu -l 'select option')"
     case "$CHOICE" in
     autolog*)
@@ -90,9 +101,9 @@ OK' | imenu -l 'select option')"
     logging)
         chooselogs
         ;;
-    packages)
-       selectpackages
-       ;;
+    "extra software")
+        selectpackages
+        ;;
     OK)
         echo "advanced options done"
         exit
index 3cdce3f..b62dabb 100755 (executable)
@@ -150,7 +150,7 @@ chooseroot() {
 # 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
index 808024d..848c510 100755 (executable)
@@ -60,30 +60,14 @@ if iroot guestadditions; then
 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