Skip to content

Commit

Permalink
Merge pull request #62 from cptchuckles/case-insensitive
Browse files Browse the repository at this point in the history
Force defaults and lowercase values for MC_VERSION and PAPER_BUILD
  • Loading branch information
Phyremaster authored Sep 8, 2023
2 parents 14f33cf + f591cf2 commit 673c1e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN apk update \
&& mkdir /papermc

# Start script
CMD ["sh", "./papermc.sh"]
CMD ["bash", "./papermc.sh"]

# Container setup
EXPOSE 25565/tcp
Expand Down
8 changes: 8 additions & 0 deletions papermc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
# Enter server directory
cd papermc

# Set nullstrings back to 'latest'
: ${MC_VERSION:=latest}
: ${PAPER_BUILD:=latest}

# Lowercase these to avoid 404 errors on wget
MC_VERSION=${MC_VERSION,,}
PAPER_BUILD=${PAPER_BUILD,,}

# Get version information and build download URL and jar name
URL=https://papermc.io/api/v2/projects/paper
if [ ${MC_VERSION} = latest ]
Expand Down

0 comments on commit 673c1e2

Please sign in to comment.