Add update skip check
This commit is contained in:
parent
5575265a00
commit
b7edb8b0c7
10
start.sh
10
start.sh
@ -97,6 +97,7 @@ function check_java {
|
|||||||
# Check if the correct version of java is installed
|
# Check if the correct version of java is installed
|
||||||
if (( 8 <= minecraft_middle && minecraft_middle <= 11 )); then
|
if (( 8 <= minecraft_middle && minecraft_middle <= 11 )); then
|
||||||
if ! [[ $java_version -eq 8 ]]; then
|
if ! [[ $java_version -eq 8 ]]; then
|
||||||
|
echo "Java $java_version is installed."
|
||||||
echo "Java 8 is required for Minecraft version $select_version. Please install Java 8."
|
echo "Java 8 is required for Minecraft version $select_version. Please install Java 8."
|
||||||
if [[ $java_version == 0 ]]; then
|
if [[ $java_version == 0 ]]; then
|
||||||
exit 3
|
exit 3
|
||||||
@ -105,14 +106,16 @@ function check_java {
|
|||||||
fi
|
fi
|
||||||
elif (( 12 <= minecraft_middle && minecraft_middle <= 16 )); then
|
elif (( 12 <= minecraft_middle && minecraft_middle <= 16 )); then
|
||||||
if ! [[ $java_version -eq 11 ]]; then
|
if ! [[ $java_version -eq 11 ]]; then
|
||||||
|
echo "Java $java_version is installed."
|
||||||
|
echo "Java 11 is required for Minecraft version $select_version. Please install Java 11."
|
||||||
if [[ $java_version == 0 ]]; then
|
if [[ $java_version == 0 ]]; then
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
echo "Java 11 is required for Minecraft version $select_version. Please install Java 11."
|
|
||||||
ask_continue
|
ask_continue
|
||||||
fi
|
fi
|
||||||
elif (( minecraft_middle == 17 )); then
|
elif (( minecraft_middle == 17 )); then
|
||||||
if ! [[ $java_version -eq 16 ]]; then
|
if ! [[ $java_version -eq 16 ]]; then
|
||||||
|
echo "Java $java_version is installed."
|
||||||
echo "Java 16 is required for Minecraft version $select_version. Please install Java 16."
|
echo "Java 16 is required for Minecraft version $select_version. Please install Java 16."
|
||||||
if [[ $java_version == 0 ]]; then
|
if [[ $java_version == 0 ]]; then
|
||||||
exit 3
|
exit 3
|
||||||
@ -121,6 +124,7 @@ function check_java {
|
|||||||
fi
|
fi
|
||||||
elif (( 18 <= minecraft_middle )); then
|
elif (( 18 <= minecraft_middle )); then
|
||||||
if ! [[ $java_version -eq 17 ]]; then
|
if ! [[ $java_version -eq 17 ]]; then
|
||||||
|
echo "Java $java_version is installed."
|
||||||
echo "Java 17 is required for Minecraft version $select_version. Please install Java 17."
|
echo "Java 17 is required for Minecraft version $select_version. Please install Java 17."
|
||||||
if [[ $java_version == 0 ]]; then
|
if [[ $java_version == 0 ]]; then
|
||||||
exit 3
|
exit 3
|
||||||
@ -476,8 +480,12 @@ function load_config {
|
|||||||
|
|
||||||
# Main function
|
# Main function
|
||||||
function main {
|
function main {
|
||||||
|
if [[ $check_self_update == true ]]; then
|
||||||
# Check for script updates
|
# Check for script updates
|
||||||
check_self_update
|
check_self_update
|
||||||
|
else
|
||||||
|
echo "Skipping script update check."
|
||||||
|
fi
|
||||||
|
|
||||||
# Load config
|
# Load config
|
||||||
load_config
|
load_config
|
||||||
|
Loading…
x
Reference in New Issue
Block a user