Votre Nom 1 year ago
parent
commit
5139b6615a
1 changed files with 18 additions and 20 deletions
  1. 18 20
      build_cube.sh

+ 18 - 20
build_cube.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 set -e
-Version=18.4.0
+Version=18.4.1
 Cuda=YES
 kernel_custom=YES
 Miners=Yes
@@ -15,7 +15,7 @@ fi
 clear
 if [ ! -f /home/wareck/.ipass ]
 then
-echo "passe=0" > /home/wareck/.ipass
+echo "passe=1" > /home/wareck/.ipass
 fi
 source /home/wareck/.ipass
 
@@ -88,12 +88,12 @@ if [ $Cuda = "YES" ]
 then
 print_centered "CUDA Compute Drivers"
 fi
-print_centered "Stage $passe"
+print_centered "Stage $passe/4"
 }
 
 function update_ {
 case $passe in
-0)
+1)
    echo -e "$(tput setaf 10)\nUpdate and install packages (second pass):$(tput sgr0)"
    sudo apt-get update
    echo -e ""
@@ -108,7 +108,7 @@ case $passe in
    sudo apt-get install libglib2.0-dev libgtk2.0-dev libsensors4-dev htop vlc locate cmake -y
    echo -e "Done."
    ;;
-1)
+2)
    if [ $Cuda = "YES" ]
    then
    echo -e "$(tput setaf 10)\nInstall Cuda packages:$(tput sgr0)"
@@ -142,7 +142,7 @@ fi
 }
 
 function nvidia_driver_ {
-if [ $passe = "0" ]
+if [ $passe = "1" ]
 then
 	if ! [ -f /etc/modprobe.d/blacklist-nvidia-nouveau.conf ]
 	then
@@ -157,10 +157,10 @@ then
 	else
 	sudo apt-get install build-essential libglvnd-dev cmake libhugetlbfs-dev libc-dev libc6-dev g++ -y
 	fi
-	echo "passe=1" > /home/wareck/.ipass
+	echo "passe=2" > /home/wareck/.ipass
 	decompte_
 fi
-if [ $passe = "1" ]
+if [ $passe = "2" ]
 then
 case $Cuda in
 NO)
@@ -189,7 +189,7 @@ YES)
 	chmod +x cuda_12.3.1_545.23.08_linux.run
 	sudo ./cuda_12.3.1_545.23.08_linux.run --silent --driver --toolkit
 	sudo rm cuda_12.3.1_545.23.08_linux.run
-	echo "passe=2" > /home/wareck/.ipass
+	echo "passe=3" > /home/wareck/.ipass
 	decompte_
 ;;
 esac
@@ -711,13 +711,11 @@ fi
 sudo cp /home/wareck/Build_Cube/pack/lxterminal.conf /home/wareck/.config/lxterminal/
 sudo chmod 777 /home/wareck/.config/lxterminal/lxterminal.conf
 echo "Done."
-echo "passe=3" >/home/wareck/.ipass
+echo "passe=4" >/home/wareck/.ipass
 decompte_
 }
 
 function printer_ {
-if [ ! -f /home/wareck/.pass4 ]
-then
 if [ ! -d /usr/local/share/foomatic/ ]
 then
 if [ ! -d /tmp/foomatic-db/ ]
@@ -735,7 +733,6 @@ sudo make install
 echo "Done."
 fi
 fi
-fi
 }
 
 function mounting_drives_ {
@@ -861,9 +858,9 @@ if ! grep "wareck" /etc/sudoers >/dev/null
 then
 sudo sh -c "echo \"wareck ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers"
 fi
-if [ ! -f /home/wareck/.pass1 ]
+if [ $passe="2" ]
 then
-echo -e "$(tput setaf 10)\nUpdate and install packages (first pass):$(tput sgr0)"
+echo -e "$(tput setaf 10)\nUpdate and install packages:$(tput sgr0)"
 sudo apt-get update
 sudo apt-get install lxde lxde-icon-theme -y
 sleep 1
@@ -912,12 +909,13 @@ sudo cp /tmp/wol.service /etc/systemd/system/wol.service
 sudo systemctl daemon-reload >/dev/null
 sudo systemctl enable wol.service >/dev/null
 sudo systemctl start wol.service >/dev/null
-sleep 1
+sleep 2
+clear
 }
 
 intro_
 case $passe in
-0)
+1)
   watchdog_
   autoroot_
   ubuntu_version_check
@@ -925,17 +923,17 @@ case $passe in
   kernel_check_
   nvidia_driver_
   ;;
-1)
+2)
   nvidia_driver_
   update_
   ;;
-2)
+3)
   download_packs_
   printer_
   build_miners_
   configure_
   ;;
-3)
+4)
   mounting_drives_
   cleaning_
   remove_screensaver