OSDN Git Service

add auto graphics driver installation
authorpaperbenni <paperbenni@gmail.com>
Mon, 20 Jan 2020 15:26:39 +0000 (16:26 +0100)
committerpaperbenni <paperbenni@gmail.com>
Mon, 20 Jan 2020 15:26:39 +0000 (16:26 +0100)
depend.sh
rootinstall.sh

index 0091a91..a92013d 100644 (file)
--- a/depend.sh
+++ b/depend.sh
@@ -41,6 +41,7 @@ ipkg() {
 }
 
 ipkg wget
+ipkg hwinfo
 
 if cat /etc/os-release | grep -iq 'name.*arch' ||
     cat /etc/os-release | grep -iq 'name.*manjaro'; then
@@ -55,10 +56,10 @@ if cat /etc/os-release | grep -iq 'name.*arch' ||
 
     pacinstall slop
     pacinstall xorg-xsetroot
-    pacinstall xorg-fonts-misc # slock font
+    pacinstall xorg-fonts-misc
 
     pacinstall tar
-    
+
     pacinstall autoconf
     pacinstall automake
     pacinstall binutils
@@ -92,6 +93,10 @@ if cat /etc/os-release | grep -iq 'name.*arch' ||
         rm panther_launcher*.pkg.tar.xz
     fi
 
+    if hwinfo --gfxcard --short | grep -iE 'nvidia.*(gtx|rtx|titan)'; then
+        echo "installing nvidia graphics drivers"
+        sudo mhwd -a pci nonfree 0300
+    fi
 fi
 
 # ubuntu specific stuff
index 1e78930..7951adc 100644 (file)
@@ -104,12 +104,11 @@ for i in ./*; do
     sudo chmod 755 /usr/local/bin/"$FILENAME"
 done
 
+cd ..
 # session for lightdm
 sudo mv instantwm.desktop /usr/share/xsessions/
 sudo chmod 644 /usr/share/xsessions/instantwm.desktop
 
-cd ..
-
 rm -rf instantOS
 
 # laptop specific stuff