Diff
checker
Texto
Texto
Imágenes
Documentos
Excel
Carpetas
Legal
Enterprise
Aplicación de escritorio
Precios
Iniciar sesión
Descargar Diffchecker Desktop
Comparar texto
Encuentra la diferencia entre dos archivos de texto
Herramientas
Historial
Editor live
Ocultar sin cambios
Sin ajuste de línea
Vista
Dividido
Unificado
Nivel de detalle
Inteligente
Palabra
Letra
Resaltado de sintaxis
Elegir sintaxis
Ignorar
Transformar texto
Ir al primer cambio
Editar entrada
Diffchecker Desktop
La forma más segura de usar Diffchecker. ¡Obtén la app de Diffchecker Desktop: tus diffs nunca salen de tu computadora!
Obtener Desktop
Untitled Diff
Creado
hace 4 años
El diff nunca expira
Borrar
Exportar
Compartir
Explicar
72 eliminaciones
Líneas
Total
Eliminado
Caracteres
Total
Eliminado
Para continuar usando esta función, actualice a
Diff
checker
Pro
Ver precios
117 líneas
Copiar todo
57 adiciones
Líneas
Total
Añadido
Caracteres
Total
Añadido
Para continuar usando esta función, actualice a
Diff
checker
Pro
Ver precios
122 líneas
Copiar todo
#!/bin/bash
#!/bin/bash
# Forge Installation Script
# Forge Installation Script
#
#
# Server Files: /mnt/server
# Server Files: /mnt/server
apt update
apt update
apt install -y curl jq
apt install -y curl jq
Copiar
Copiado
Copiar
Copiado
if [
! -d /mnt/server ]
; then
if [
[
! -d /mnt/server ]
]
; then
mkdir /mnt/server
mkdir /mnt/server
fi
fi
cd /mnt/server
cd /mnt/server
# Remove spaces from the version number to avoid issues with curl
# Remove spaces from the version number to avoid issues with curl
FORGE_VERSION="$(echo "$FORGE_VERSION" | tr -d ' ')"
FORGE_VERSION="$(echo "$FORGE_VERSION" | tr -d ' ')"
MC_VERSION="$(echo "$MC_VERSION" | tr -d ' ')"
MC_VERSION="$(echo "$MC_VERSION" | tr -d ' ')"
Copiar
Copiado
Copiar
Copiado
if [
! -z ${FORGE_VERSION} ]
; then
if [
[
! -z ${FORGE_VERSION} ]
]
; then
DOWNLOAD_LINK=https://maven.minecraftforge.net/net/minecraftforge/forge/${FORGE_VERSION}/forge-${FORGE_VERSION}
DOWNLOAD_LINK=https://maven.minecraftforge.net/net/minecraftforge/forge/${FORGE_VERSION}/forge-${FORGE_VERSION}
FORGE_JAR=forge-${FORGE_VERSION}*.jar
FORGE_JAR=forge-${FORGE_VERSION}*.jar
else
else
Copiar
Copiado
Copiar
Copiado
JSON_DATA=$(curl -sSL https://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json)
JSON_DATA=$(curl -sSL https://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json)
Copiar
Copiado
Copiar
Copiado
if [
"${MC_VERSION}" == "latest" ]
|| [
"${MC_VERSION}" == "" ]
; then
if [
[
"${MC_VERSION}" == "latest" ]
]
|| [
[
"${MC_VERSION}" == "" ]
]
; then
echo -e "getting latest version of forge."
echo -e "getting latest version of forge."
MC_VERSION=$(echo -e ${JSON_DATA} | jq -r '.promos | del(."latest-1.7.10") | del(."1.7.10-latest-1.7.10") | to_entries[] | .key | select(contains("
recommended
")) | split("-")[0]' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -1)
MC_VERSION=$(echo -e ${JSON_DATA} | jq -r '.promos | del(."latest-1.7.10") | del(."1.7.10-latest-1.7.10") | to_entries[] | .key | select(contains("
latest
")) | split("-")[0]' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -1)
BUILD_TYPE=latest
BUILD_TYPE=latest
fi
fi
Copiar
Copiado
Copiar
Copiado
if [
"${BUILD_TYPE}" != "recommended" ]
&& [
"${BUILD_TYPE}" != "latest" ]
; then
if [
[
"${BUILD_TYPE}" != "recommended" ]
]
&& [
[
"${BUILD_TYPE}" != "latest" ]
]
; then
BUILD_TYPE=recommended
BUILD_TYPE=recommended
fi
fi
Copiar
Copiado
Copiar
Copiado
echo -e "minecraft version: ${MC_VERSION}"
echo -e "minecraft version: ${MC_VERSION}"
echo -e "build type: ${BUILD_TYPE}"
echo -e "build type: ${BUILD_TYPE}"
Copiar
Copiado
Copiar
Copiado
## some variables for getting versions and things
## some variables for getting versions and things
FILE_SITE=https://maven.minecraftforge.net/net/minecraftforge/forge/
FILE_SITE=https://maven.minecraftforge.net/net/minecraftforge/forge/
VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION "${MC_VERSION}" --arg BUILD_TYPE "${BUILD_TYPE}" '.promos | del(."latest-1.7.10") | del(."1.7.10-latest-1.7.10") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains($BUILD_TYPE))')
VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION "${MC_VERSION}" --arg BUILD_TYPE "${BUILD_TYPE}" '.promos | del(."latest-1.7.10") | del(."1.7.10-latest-1.7.10") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains($BUILD_TYPE))')
Copiar
Copiado
Copiar
Copiado
## locating the forge version
## locating the forge version
if [
"${VERSION_KEY}" == "" ]
&& [
"${BUILD_TYPE}" == "recommended" ]
; then
if [
[
"${VERSION_KEY}" == "" ]
]
&& [
[
"${BUILD_TYPE}" == "recommended" ]
]
; then
echo -e "dropping back to latest from recommended due to there not being a recommended version of forge for the mc version requested."
echo -e "dropping back to latest from recommended due to there not being a recommended version of forge for the mc version requested."
VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION "${MC_VERSION}" '.promos | del(."latest-1.7.10") | del(."1.7.10-latest-1.7.10") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains("
recommended
"))')
VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION "${MC_VERSION}" '.promos | del(."latest-1.7.10") | del(."1.7.10-latest-1.7.10") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains("
latest
"))')
fi
fi
Copiar
Copiado
Copiar
Copiado
## Error if the mc version set wasn't valid.
## Error if the mc version set wasn't valid.
if [ "${VERSION_KEY}" == "" ] || [ "${VERSION_KEY}" == "null" ]; then
if [ "${VERSION_KEY}" == "" ] || [ "${VERSION_KEY}" == "null" ]; then
echo -e "The install failed because there is no valid version of forge for the version of minecraft selected."
echo -e "The install failed because there is no valid version of forge for the version of minecraft selected."
exit 1
exit 1
fi
fi
Copiar
Copiado
Copiar
Copiado
FORGE_VERSION=$(echo -e ${JSON_DATA} | jq -r --arg VERSION_KEY "$VERSION_KEY" '.promos | .[$VERSION_KEY]')
FORGE_VERSION=$(echo -e ${JSON_DATA} | jq -r --arg VERSION_KEY "$VERSION_KEY" '.promos | .[$VERSION_KEY]')
Copiar
Copiado
Copiar
Copiado
if [
"${MC_VERSION}" == "1.7.10" ]
|| [
"${MC_VERSION}" == "1.8.9" ]
; then
if [
[
"${MC_VERSION}" == "1.7.10" ]
]
|| [
[
"${MC_VERSION}" == "1.8.9" ]
]
; then
DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}
DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}
FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}.jar
FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}.jar
if [
"${MC_VERSION}" == "1.7.10" ]
; then
if [
[
"${MC_VERSION}" == "1.7.10" ]
]
; then
FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}-universal.jar
FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}-universal.jar
fi
else
DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}
FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}.jar
fi
fi
Copiar
Copiado
Copiar
Copiado
else
DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}
FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}.jar
fi
fi
fi
Copiar
Copiado
Copiar
Copiado
#Adding .jar when not eding by SERVER_JARFILE
#Adding .jar when not eding by SERVER_JARFILE
if [[ ! $SERVER_JARFILE = *\.jar ]]; then
if [[ ! $SERVER_JARFILE = *\.jar ]]; then
SERVER_JARFILE="$SERVER_JARFILE.jar"
SERVER_JARFILE="$SERVER_JARFILE.jar"
fi
fi
#Downloading jars
#Downloading jars
echo -e "Downloading forge version ${FORGE_VERSION}"
echo -e "Downloading forge version ${FORGE_VERSION}"
echo -e "Download link is ${DOWNLOAD_LINK}"
echo -e "Download link is ${DOWNLOAD_LINK}"
Copiar
Copiado
Copiar
Copiado
if [
! -z "${DOWNLOAD_LINK}" ]
; then
if [
[
! -z "${DOWNLOAD_LINK}" ]
]
; then
if curl --output /dev/null --silent --head --fail ${DOWNLOAD_LINK}-installer.jar; then
if curl --output /dev/null --silent --head --fail ${DOWNLOAD_LINK}-installer.jar; then
echo -e "installer jar download link is valid."
echo -e "installer jar download link is valid."
else
else
echo -e "link is invalid. Exiting now"
echo -e "link is invalid. Exiting now"
exit 2
exit 2
fi
fi
else
else
Copiar
Copiado
Copiar
Copiado
echo -e "no download link provided. Exiting now"
echo -e "no download link provided. Exiting now"
exit 3
exit 3
fi
fi
curl -s -o installer.jar -sS ${DOWNLOAD_LINK}-installer.jar
curl -s -o installer.jar -sS ${DOWNLOAD_LINK}-installer.jar
Copiar
Copiado
Copiar
Copiado
#Checking if downloaded jars exist
#Checking if downloaded jars exist
Copiar
Copiado
Copiar
Copiado
if [
! -f ./installer.jar ]
; then
if [
[
! -f ./installer.jar ]
]
; then
echo "!!! Error
by
downloading forge version ${FORGE_VERSION} !!!"
echo "!!! Error
downloading forge version ${FORGE_VERSION} !!!"
exit
exit
fi
fi
Copiar
Copiado
Copiar
Copiado
# Delete args file to support downgrading to versions below 1.17
function unix_args {
if [ -f unix_args.txt ]; then
echo -e "Detected Forge 1.17 or newer version. Setting up forge unix args."
rm
unix_args.txt
ln -sf libraries/net/minecraftforge/forge/*/unix_args.txt
unix_args.txt
exit
}
fi
Copiar
Copiado
Copiar
Copiado
# Delete args to support downgrading/upgrading
rm -rf libraries/net/minecraftforge/forge
rm unix_args.txt
#Installing server
#Installing server
echo -e "Installing forge server.\n"
echo -e "Installing forge server.\n"
Copiar
Copiado
Copiar
Copiado
java -jar installer.jar --installServer || { echo -e "install failed
"; exit 4; }
java -jar installer.jar --installServer || { echo -e "install failed
using Forge version ${FORGE_VERSION} and Minecraft version ${MINECRAFT_VERSION}
"; exit 4; }
Copiar
Copiado
Copiar
Copiado
if [[ $MC_VERSION =
= *"1.17."* || $MC_VERSION == *"1.18."*
|| $FORGE_VERSION =
= *"1.17."* ||
$FORGE_VERSION =
= *"1.18."*
]]; then
# Check if we need a symlink for 1.17+ Forge JPMS args
# Create a symlink for 1.17+ Forge args
if [[ $MC_VERSION =
~ ^1\.(17|18|19|20|21|22|23)
|| $FORGE_VERSION =
~ ^1\.(17|18|19|20|21|22|23) ]]; then
ln -sf libraries/net/minecraftforge/forge/*/unix_args.txt
unix_args
.txt
unix_args
else
# For versions below 1.17 that ship with jar
delete installer.jar
# Check if someone has set MC to latest but overwrote it with older Forge version, otherwise we would have false positives
mv $FORGE_JAR $SERVER_JARFILE
elif [[ $MC_VERSION == "latest" &&
$FORGE_VERSION =
~ ^1\.(17|18|19|20|21|22|23)
]]; then
echo -e "Deleting installer.jar file.\n"
unix_args
rm -rf installer.jar
else
# For versions below 1.17 that ship with jar
mv $FORGE_JAR $SERVER_JARFILE
fi
fi
Copiar
Copiado
Copiar
Copiado
echo -e "Deleting installer.jar file.\n"
rm -rf installer.jar
Diferencias guardadas
Texto original
Abrir archivo
#!/bin/bash # Forge Installation Script # # Server Files: /mnt/server apt update apt install -y curl jq if [ ! -d /mnt/server ]; then mkdir /mnt/server fi cd /mnt/server # Remove spaces from the version number to avoid issues with curl FORGE_VERSION="$(echo "$FORGE_VERSION" | tr -d ' ')" MC_VERSION="$(echo "$MC_VERSION" | tr -d ' ')" if [ ! -z ${FORGE_VERSION} ]; then DOWNLOAD_LINK=https://maven.minecraftforge.net/net/minecraftforge/forge/${FORGE_VERSION}/forge-${FORGE_VERSION} FORGE_JAR=forge-${FORGE_VERSION}*.jar else JSON_DATA=$(curl -sSL https://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json) if [ "${MC_VERSION}" == "latest" ] || [ "${MC_VERSION}" == "" ] ; then echo -e "getting latest version of forge." MC_VERSION=$(echo -e ${JSON_DATA} | jq -r '.promos | del(."latest-1.7.10") | del(."1.7.10-latest-1.7.10") | to_entries[] | .key | select(contains("recommended")) | split("-")[0]' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -1) BUILD_TYPE=latest fi if [ "${BUILD_TYPE}" != "recommended" ] && [ "${BUILD_TYPE}" != "latest" ]; then BUILD_TYPE=recommended fi echo -e "minecraft version: ${MC_VERSION}" echo -e "build type: ${BUILD_TYPE}" ## some variables for getting versions and things FILE_SITE=https://maven.minecraftforge.net/net/minecraftforge/forge/ VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION "${MC_VERSION}" --arg BUILD_TYPE "${BUILD_TYPE}" '.promos | del(."latest-1.7.10") | del(."1.7.10-latest-1.7.10") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains($BUILD_TYPE))') ## locating the forge version if [ "${VERSION_KEY}" == "" ] && [ "${BUILD_TYPE}" == "recommended" ]; then echo -e "dropping back to latest from recommended due to there not being a recommended version of forge for the mc version requested." VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION "${MC_VERSION}" '.promos | del(."latest-1.7.10") | del(."1.7.10-latest-1.7.10") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains("recommended"))') fi ## Error if the mc version set wasn't valid. if [ "${VERSION_KEY}" == "" ] || [ "${VERSION_KEY}" == "null" ]; then echo -e "The install failed because there is no valid version of forge for the version of minecraft selected." exit 1 fi FORGE_VERSION=$(echo -e ${JSON_DATA} | jq -r --arg VERSION_KEY "$VERSION_KEY" '.promos | .[$VERSION_KEY]') if [ "${MC_VERSION}" == "1.7.10" ] || [ "${MC_VERSION}" == "1.8.9" ]; then DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION} FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}.jar if [ "${MC_VERSION}" == "1.7.10" ]; then FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}-universal.jar fi else DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION} FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}.jar fi fi #Adding .jar when not eding by SERVER_JARFILE if [[ ! $SERVER_JARFILE = *\.jar ]]; then SERVER_JARFILE="$SERVER_JARFILE.jar" fi #Downloading jars echo -e "Downloading forge version ${FORGE_VERSION}" echo -e "Download link is ${DOWNLOAD_LINK}" if [ ! -z "${DOWNLOAD_LINK}" ]; then if curl --output /dev/null --silent --head --fail ${DOWNLOAD_LINK}-installer.jar; then echo -e "installer jar download link is valid." else echo -e "link is invalid. Exiting now" exit 2 fi else echo -e "no download link provided. Exiting now" exit 3 fi curl -s -o installer.jar -sS ${DOWNLOAD_LINK}-installer.jar #Checking if downloaded jars exist if [ ! -f ./installer.jar ]; then echo "!!! Error by downloading forge version ${FORGE_VERSION} !!!" exit fi # Delete args file to support downgrading to versions below 1.17 if [ -f unix_args.txt ]; then rm unix_args.txt exit fi #Installing server echo -e "Installing forge server.\n" java -jar installer.jar --installServer || { echo -e "install failed"; exit 4; } if [[ $MC_VERSION == *"1.17."* || $MC_VERSION == *"1.18."* || $FORGE_VERSION == *"1.17."* || $FORGE_VERSION == *"1.18."* ]]; then # Create a symlink for 1.17+ Forge args ln -sf libraries/net/minecraftforge/forge/*/unix_args.txt unix_args.txt else # For versions below 1.17 that ship with jar delete installer.jar mv $FORGE_JAR $SERVER_JARFILE echo -e "Deleting installer.jar file.\n" rm -rf installer.jar fi
Texto modificado
Abrir archivo
#!/bin/bash # Forge Installation Script # # Server Files: /mnt/server apt update apt install -y curl jq if [[ ! -d /mnt/server ]]; then mkdir /mnt/server fi cd /mnt/server # Remove spaces from the version number to avoid issues with curl FORGE_VERSION="$(echo "$FORGE_VERSION" | tr -d ' ')" MC_VERSION="$(echo "$MC_VERSION" | tr -d ' ')" if [[ ! -z ${FORGE_VERSION} ]]; then DOWNLOAD_LINK=https://maven.minecraftforge.net/net/minecraftforge/forge/${FORGE_VERSION}/forge-${FORGE_VERSION} FORGE_JAR=forge-${FORGE_VERSION}*.jar else JSON_DATA=$(curl -sSL https://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json) if [[ "${MC_VERSION}" == "latest" ]] || [[ "${MC_VERSION}" == "" ]]; then echo -e "getting latest version of forge." MC_VERSION=$(echo -e ${JSON_DATA} | jq -r '.promos | del(."latest-1.7.10") | del(."1.7.10-latest-1.7.10") | to_entries[] | .key | select(contains("latest")) | split("-")[0]' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -1) BUILD_TYPE=latest fi if [[ "${BUILD_TYPE}" != "recommended" ]] && [[ "${BUILD_TYPE}" != "latest" ]]; then BUILD_TYPE=recommended fi echo -e "minecraft version: ${MC_VERSION}" echo -e "build type: ${BUILD_TYPE}" ## some variables for getting versions and things FILE_SITE=https://maven.minecraftforge.net/net/minecraftforge/forge/ VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION "${MC_VERSION}" --arg BUILD_TYPE "${BUILD_TYPE}" '.promos | del(."latest-1.7.10") | del(."1.7.10-latest-1.7.10") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains($BUILD_TYPE))') ## locating the forge version if [[ "${VERSION_KEY}" == "" ]] && [[ "${BUILD_TYPE}" == "recommended" ]]; then echo -e "dropping back to latest from recommended due to there not being a recommended version of forge for the mc version requested." VERSION_KEY=$(echo -e ${JSON_DATA} | jq -r --arg MC_VERSION "${MC_VERSION}" '.promos | del(."latest-1.7.10") | del(."1.7.10-latest-1.7.10") | to_entries[] | .key | select(contains($MC_VERSION)) | select(contains("latest"))') fi ## Error if the mc version set wasn't valid. if [ "${VERSION_KEY}" == "" ] || [ "${VERSION_KEY}" == "null" ]; then echo -e "The install failed because there is no valid version of forge for the version of minecraft selected." exit 1 fi FORGE_VERSION=$(echo -e ${JSON_DATA} | jq -r --arg VERSION_KEY "$VERSION_KEY" '.promos | .[$VERSION_KEY]') if [[ "${MC_VERSION}" == "1.7.10" ]] || [[ "${MC_VERSION}" == "1.8.9" ]]; then DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION} FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}.jar if [[ "${MC_VERSION}" == "1.7.10" ]]; then FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}-${MC_VERSION}-universal.jar fi else DOWNLOAD_LINK=${FILE_SITE}${MC_VERSION}-${FORGE_VERSION}/forge-${MC_VERSION}-${FORGE_VERSION} FORGE_JAR=forge-${MC_VERSION}-${FORGE_VERSION}.jar fi fi #Adding .jar when not eding by SERVER_JARFILE if [[ ! $SERVER_JARFILE = *\.jar ]]; then SERVER_JARFILE="$SERVER_JARFILE.jar" fi #Downloading jars echo -e "Downloading forge version ${FORGE_VERSION}" echo -e "Download link is ${DOWNLOAD_LINK}" if [[ ! -z "${DOWNLOAD_LINK}" ]]; then if curl --output /dev/null --silent --head --fail ${DOWNLOAD_LINK}-installer.jar; then echo -e "installer jar download link is valid." else echo -e "link is invalid. Exiting now" exit 2 fi else echo -e "no download link provided. Exiting now" exit 3 fi curl -s -o installer.jar -sS ${DOWNLOAD_LINK}-installer.jar #Checking if downloaded jars exist if [[ ! -f ./installer.jar ]]; then echo "!!! Error downloading forge version ${FORGE_VERSION} !!!" exit fi function unix_args { echo -e "Detected Forge 1.17 or newer version. Setting up forge unix args." ln -sf libraries/net/minecraftforge/forge/*/unix_args.txt unix_args.txt } # Delete args to support downgrading/upgrading rm -rf libraries/net/minecraftforge/forge rm unix_args.txt #Installing server echo -e "Installing forge server.\n" java -jar installer.jar --installServer || { echo -e "install failed using Forge version ${FORGE_VERSION} and Minecraft version ${MINECRAFT_VERSION}"; exit 4; } # Check if we need a symlink for 1.17+ Forge JPMS args if [[ $MC_VERSION =~ ^1\.(17|18|19|20|21|22|23) || $FORGE_VERSION =~ ^1\.(17|18|19|20|21|22|23) ]]; then unix_args # Check if someone has set MC to latest but overwrote it with older Forge version, otherwise we would have false positives elif [[ $MC_VERSION == "latest" && $FORGE_VERSION =~ ^1\.(17|18|19|20|21|22|23) ]]; then unix_args else # For versions below 1.17 that ship with jar mv $FORGE_JAR $SERVER_JARFILE fi echo -e "Deleting installer.jar file.\n" rm -rf installer.jar
Encontrar la diferencia