OSDN Git Service

disable 32bit libs on artix
authorpaperbenni <paperbenni@gmail.com>
Thu, 25 Jun 2020 15:39:02 +0000 (17:39 +0200)
committerpaperbenni <paperbenni@gmail.com>
Thu, 25 Jun 2020 15:39:02 +0000 (17:39 +0200)
chroot/drivers.sh
depend/depend.sh

index 13c29b9..1be3afd 100755 (executable)
@@ -29,7 +29,7 @@ else
             elif grep -iq "dkms" "$DRIVERFILE"; then
                 pacman -S --noconfirm nvidia-dkms nvidia-utils
 
-                if ! uname -m | grep -q '^i'; then
+                if ! uname -m | grep -q '^i' && command -v systemctl; then
                     pacman -S --noconfirm lib32-nvidia-utils
                 fi
             elif grep -iq "nvidia" "$DRIVERFILE"; then
@@ -41,7 +41,10 @@ else
             echo "defaulting to open source driver"
             pacman -S --noconfirm mesa xf86-video-nouveau
         fi
-        pacman -S --noconfirm --needed vulkan-icd-loader lib32-vulkan-icd-loader
+        pacman -S --noconfirm --needed vulkan-icd-loader
+        if command -v systemctl; then
+            pacman -S --noconfirm --needed lib32-vulkan-icd-loader
+        fi
     ## Intel
     elif lspci | grep -i vga | grep -i intel; then
         echo "intel integrated detected"
@@ -53,6 +56,6 @@ else
 fi
 
 # 32 bit mesa
-if ! uname -m | grep -q '^i'; then
+if ! uname -m | grep -q '^i' && command -v systemctl; then
     pacman -S --noconfirm lib32-mesa
 fi
index cc0bbea..8eec782 100755 (executable)
@@ -24,22 +24,24 @@ setinfo "downloading installer dependencies"
 mkdir -p /opt/instantos
 touch /opt/instantos/realinstall
 
-# enable multilib
-# do it before updating mirrors
-if uname -m | grep -q '^i' ||
-    grep -qi '^\[multilib' /etc/pacman.conf ||
-    grep -qi 'manjaro' /etc/os-release; then
-    echo "not enabling multilib"
-else
-    echo "enabling multilib"
-    echo "[multilib]" >>/etc/pacman.conf
-    echo "Include = /etc/pacman.d/mirrorlist" >>/etc/pacman.conf
+if command -v systemctl; then
+    # enable multilib
+    # do it before updating mirrors
+    if uname -m | grep -q '^i' ||
+        grep -qi '^\[multilib' /etc/pacman.conf ||
+        grep -qi 'manjaro' /etc/os-release; then
+        echo "not enabling multilib"
+    else
+        echo "enabling multilib"
+        echo "[multilib]" >>/etc/pacman.conf
+        echo "Include = /etc/pacman.d/mirrorlist" >>/etc/pacman.conf
+    fi
 fi
 
 pacman -Sy --noconfirm
 
 # install reflector for automirror
-if ! grep -i 'manjaro' /etc/os-release; then
+if ! grep -i 'manjaro' /etc/os-release && command -v systemctl; then
     while ! pacman -S --noconfirm --needed reflector; do
         echo "reflector install failed"
         sleep 10