Votre Nom 1 year ago
parent
commit
0d228ecdf8
6 changed files with 52 additions and 22 deletions
  1. 9 2
      build_cube.sh
  2. 1 1
      options/build_gerbera.sh
  3. 1 1
      options/chia.sh
  4. 4 8
      options/download_pack.sh
  5. 35 8
      options/tools/_cmake.sh
  6. 2 2
      options/watchdog.sh

+ 9 - 2
build_cube.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 set -e
-Version=14.8
+Version=14.9
 Cuda=No
 kernel_custom=YES
 Webmin="webmin-2.021"
@@ -216,7 +216,7 @@ fi
 
 echo -e "$(tput setaf 10)\nDownloading miners:$(tput sgr0)"
 cd /home/wareck
-if ! [ -d miners ]; then mkdir miners;fi
+if ! [ -d miners ]; then mkdir -p miners;fi
 
 cd /home/wareck/miners
 if ! [ -d xmrig ]
@@ -251,6 +251,7 @@ echo "Done."
 function build_miners_ {
 if [ ! -f /home/wareck/.pass3 ]
 then
+cmake_ #check cmake version
 cd /home/wareck
 tar xfJ gpu-miners.tar.xz
 cd /home/wareck/miners
@@ -872,6 +873,12 @@ sudo rm autostart
 sudo apt-get remove xscreensaver xscreensaver-data -y
 }
 
+function cmake_ {
+pids=""
+/home/wareck/Build_Cube/options/tools/_cmake.sh rollback & pids="$pids $!"
+wait $pids
+}
+
 intro_
 autoroot_
 ubuntu_version_check

+ 1 - 1
options/build_gerbera.sh

@@ -1,5 +1,5 @@
 #!/bin/bash
-Version=3.3
+Version=3.4
 XService=YES
 function print_centered {
      [[ $# == 0 ]] && return 1

+ 1 - 1
options/chia.sh

@@ -2,7 +2,7 @@
 set -e
 Gui=No #can be Yes No or Only
 Service=Yes
-Version=4.1
+Version=4.2
 MadMax=Yes
 GigaHorse=Yes
 BladeBit=Yes

+ 4 - 8
options/download_pack.sh

@@ -1,14 +1,14 @@
 #!/bin/bash
-Webmin=$(grep "Webmin=" ../build_cube.sh  | cut -d '"' -f 2)
+Webmin=$(grep "Webmin=" /home/wareck/Build_Cube/build_cube.sh  | cut -d '"' -f 2)
 if [ ! -d temp ]; then
 mkdir temp
 fi
 cd temp
 if grep "driver=AMD" /home/wareck/Build_Cube/build_cube.sh
 then
-driver=AMD
+driver="AMD"
 else
-driver=NVIDIA
+driver="NVIDIA"
 fi
 
 function download_copy {
@@ -43,7 +43,7 @@ download_copy
 box=flexfarmer.tar.xz
 download_copy
 
-if [ $Driver="AMD" ]
+if [ $driver = "AMD" ]
 then
 #box=amdgpu-install_22.10.2.50102-1_all.deb
 #download_copy
@@ -51,10 +51,6 @@ then
 #download_copy
 box=amdgpu-install_5.4.50403-1_all.deb
 download_copy
-
-else
-box=NVIDIA-Linux-x86_64-525.105.17.run
-download_copy
 fi
 
 box=linux-firmware.tar.xz

+ 35 - 8
options/tools/_cmake.sh

@@ -36,6 +36,37 @@ esac
 echo "Done"
 }
 
+function rollback {
+echo -e "$(tput setaf 10)\nInstall / Update cmake :$(tput sgr0)"
+if [ -x "$(command -v cmake)" ];then flag=1; else flag=0;fi
+case $flag in
+0)
+        wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/cmake_3.16.3-1_amd64.deb
+        sudo dpkg -i cmake_3.16.3-1_amd64.deb
+        rm cmake_3.16.3-1_amd64.deb
+        ;;
+1)
+        cmake_v="$(cmake --version | grep "version" | awk '{print $3}')"
+        echo "cmake version : $cmake_v"
+        sleep 2
+        if [ $(version $cmake_v) -gt $(version "3.18") ]
+        then
+        echo -e "cmake need rollback to cmake_3.16.3"
+        sudo apt-get -qq remove --purge cmake -y
+        wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/cmake_3.16.3-1_amd64.deb
+        sudo dpkg -i cmake_3.16.3-1_amd64.deb
+        rm cmake_3.16.3-1_amd64.deb
+        else
+        echo -e "cmake version ok."
+        sleep 2
+        fi
+        ;;
+*)      echo "Error";;
+esac
+echo "Done"
+}
+
+
 function cmake_source {
 echo -e "$(tput setaf 12)Cmake kitware build:$(tput sgr0)"
 sleep 2
@@ -50,14 +81,10 @@ hash -r
 }
 
 Mode=${Mode^^}
-if [ $Mode = "PROD" ]
-then
-install_
-fi
-if [ $Mode = "BUILD" ]
-then
-cmake_source
-fi
+if [ -z $1 ];then install_ && exit;fi
+if [ $1 = "rollback" ];then rollback;fi
+if [ $1 = "BUILD" ];then cmake_source;fi
+
 
 
 

+ 2 - 2
options/watchdog.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 set -e
-version=1
+version=1.1
 function print_centered {
      [[ $# == 0 ]] && return 1
 
@@ -32,7 +32,7 @@ print_centered "| | | | .'|  _|  _|   |  |  | . | . |"
 print_centered "|_____|__,|_| |___|_|_|____/|___|_  |"
 print_centered "                                |___|"
 echo -n "$(tput sgr0)"
-print_centered "Watchdog hardware v1.0"
+print_centered "Watchdog hardware v$version"
 
 if  [ -f /tmp/watchdog.1 ];then rm /tmp/watchdog.1;fi
 cat <<'EOF'>> /tmp/watchdog.1