This commit is contained in:
2023-11-10 08:10:21 -08:00
parent ce3b284e5a
commit 3274b72e99
5 changed files with 14 additions and 7947 deletions

22
testing/test.sh Normal file → Executable file
View File

@@ -2,15 +2,19 @@
# Copyright (c) 2023 fithwum
# All rights reserved
echo " "
wget --no-cache https://piston-meta.mojang.com/mc/game/version_manifest_v2.json -O /temp/mc-versions.json
LINE_NUM_1=grep -Rne '/temp/' -e '"id": "$MC_VERSION"'
MC_VERSION_CHECK_1=$(cat /temp/mc-versions.json | grep url | head -${LINE_NUM_1} | awk -F: '{print $3}' | sed 's/[",]//g' | sed "s/checksum//g")
rm -frv mc-versions.json
MC_VERSION=1.19.4
wget --no-cache https:${MC_VERSION_CHECK_1} -O /temp/server.json
LINE_NUM=grep -Rne '/temp/' -e '"id": "$MC_VERSION"'
MC_VERSION_CHECK=$(cat /temp/server.json | grep url | head -${LINE_NUM} | awk -F: '{print $3}' | sed 's/[",]//g' | sed "s/checksum//g")
rm -frv server.json
mkdir /mnt/Other/Dockers/minecraft/testing/temp
echo " "
wget --no-cache https://piston-meta.mojang.com/mc/game/version_manifest_v2.json -O /mnt/Other/Dockers/minecraft/testing/temp/mc-versions.json
LINE_NUM_1=$(grep -Rne '/mnt/Other/Dockers/minecraft/testing/temp/' -e '"id": "$MC_VERSION"')
MC_VERSION_CHECK_1=$(cat /mnt/Other/Dockers/minecraft/testing/temp/mc-versions.json | grep url | head -n$LINE_NUM_1 | awk -F: '{print $3}' | sed 's/[",]//g' | sed "s/checksum//g")
#rm -frv /mnt/Other/Dockers/minecraft/testing/temp/mc-versions.json
wget --no-cache https:${MC_VERSION_CHECK_1} -O /mnt/Other/Dockers/minecraft/testing/temp/server.json
LINE_NUM=$(grep -Rne '/mnt/Other/Dockers/minecraft/testing/temp/' -e '"server"')
MC_VERSION_CHECK=$(cat /mnt/Other/Dockers/minecraft/testing/temp/server.json | grep url | head -n$LINE_NUM | awk -F: '{print $3}' | sed 's/[",]//g' | sed "s/checksum//g")
#rm -frv /mnt/Other/Dockers/minecraft/testing/temp/server.json
echo "server url https:$MC_VERSION_CHECK"