Place EULA file into subdir managed by ServerSetup (#1543)

This commit is contained in:
Geoff Bourne 2022-05-30 13:07:25 -05:00 committed by GitHub
parent fd2431046c
commit 1fb04c069c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 89 additions and 92 deletions

17
.gitattributes vendored
View file

@ -1,17 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
* text=lf

View file

@ -46,7 +46,7 @@ RUN easy-add --var os=${TARGETOS} --var arch=${TARGETARCH}${TARGETVARIANT} \
--var version=0.1.1 --var app=maven-metadata-release --file {{.app}} \
--from https://github.com/itzg/{{.app}}/releases/download/{{.version}}/{{.app}}_{{.version}}_{{.os}}_{{.arch}}.tar.gz
ARG MC_HELPER_VERSION=1.16.11
ARG MC_HELPER_VERSION=1.17.0
ARG MC_HELPER_BASE_URL=https://github.com/itzg/mc-image-helper/releases/download/v${MC_HELPER_VERSION}
RUN curl -fsSL ${MC_HELPER_BASE_URL}/mc-image-helper-${MC_HELPER_VERSION}.tgz \
| tar -C /usr/share -zxf - \

View file

@ -210,6 +210,18 @@ EOF
fi
fi
# Modpacks that use https://github.com/BloodyMods/ServerStarter will sometimes specify an
# extra subpath where all the server files get installed. Need to transplant EULA file there.
serverSetupConfig=$(find "${FTB_BASE_DIR}" -type f -name server-setup-config.yaml)
if [[ $serverSetupConfig && $serverSetupConfig != "~" ]]; then
if baseInstallPath=$(mc-image-helper yaml-path --file "$serverSetupConfig" ".install.baseInstallPath"); then
resolvedBaseInstallPath="$(dirname "$serverSetupConfig")/${baseInstallPath}"
mkdir -p "$resolvedBaseInstallPath"
cp -n /data/eula.txt "${resolvedBaseInstallPath}/eula.txt"
fi
fi
FTB_SERVER_START="$startScript"
export FTB_SERVER_START