BuildTools 2 years ago
parent
commit
b163fe3870
1 changed files with 8 additions and 5 deletions
  1. 8 5
      options/minecraft.sh

+ 8 - 5
options/minecraft.sh

@@ -28,6 +28,7 @@ function print_centered {
 
 function backup_tool {
 echo -e "\n$(tput setaf 10)Backup tool:$(tput setaf 7)"
+if [ -f /tmp/mcbackup.sh ];then rm /tmp/mcbackup.sh;fi
 cat <<'EOF'>> /tmp/mcbackup.sh
 #!/bin/bash
 ####################################
@@ -38,7 +39,7 @@ cat <<'EOF'>> /tmp/mcbackup.sh
 ####################################
 set -e
 #sudo systemctl stop watchdog >/dev/null
-version=2.0
+version=2.1
 day_raw=$(date +%A_%d_%m_%y)
 
 function backup_ {
@@ -101,13 +102,13 @@ echo -e "\n$(tput setaf 10)Restore Backup:$(tput setaf 7)"
 mkdir /home/wareck/tempo
 cd /home/wareck/tempo
 cp $backup_file .
-pixz -x < $backup_file | tar xf - --checkpoint=.200
+pixz -x < $backup_file | tar xf - --checkpoint=.100
 cd /home/wareck/tempo/home/wareck/Minecraft
 cp -r /home/wareck/tempo/home/wareck/Minecraft/world /home/wareck/Minecraft/
 cp -r /home/wareck/tempo/home/wareck/Minecraft/world_nether /home/wareck/Minecraft/
 cp -r /home/wareck/tempo/home/wareck/Minecraft/world_the_end /home/wareck/Minecraft/
 cd /home/wareck
-rm -r -f /home/wareck/tempo
+sudo rm -r /home/wareck/tempo/
 fi
 echo -e
 }
@@ -130,6 +131,7 @@ sudo apt-get update
 sudo apt-get install curl wget git -y
 if ! [ -f openjdk-18_linux-x64_bin.tar.gz ]
 then
+echo -e
 curl -O https://download.java.net/java/GA/jdk18/43f95e8614114aeaa8e8a5fcf20a682d/36/GPL/openjdk-18_linux-x64_bin.tar.gz
 fi
 cat <<'EOF'>> openjdk-18_linux-x64_bin.tar.gz.md5
@@ -137,7 +139,8 @@ f3fc42bd35c3f5e9aff967c9862a153a  openjdk-18_linux-x64_bin.tar.gz
 EOF
 if md5sum -c openjdk-18_linux-x64_bin.tar.gz.md5
 then
-tar xvf openjdk-18_linux-x64_bin.tar.gz
+tar xf openjdk-18_linux-x64_bin.tar.gz --checkpoint=.100
+echo -e
 rm openjdk-18_linux-x64_bin.tar.gz
 rm openjdk-18_linux-x64_bin.tar.gz.md5
 else
@@ -161,7 +164,7 @@ fi
 version=$(java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1)
 if [ $version -ge 18 ]
 then
-echo -e "$(tput setaf 7)Java version $version =>> OK$(tput setaf 7)"
+echo -e "$(tput setaf 6)Java version $version =>> OK$(tput setaf 7)"
 else
 echo "error !"
 exit 1