Skip to content

Commit

Permalink
fix if statements, clean up mod directory handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bredo228 committed Jul 15, 2024
1 parent 5cca060 commit 9b00dd4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
9 changes: 5 additions & 4 deletions scripts/launch-resonite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ rm -r /home/container/Headless/Cache
find /Logs -type f -name *.log -atime +${LOG_RETENTION:-30} -delete

cd /home/container/Headless/net8.0
if [${ENABLE_MODS} = true]; then
dotnet Resonite.dll -HeadlessConfig /Config/${CONFIG_FILE} -Logs /Logs/ -LoadAssembly Libraries/ResoniteModLoader.dll ${ADDITIONAL_ARGUMENTS}

if [ "${ENABLE_MODS}" = "true" ]; then
dotnet Resonite.dll -HeadlessConfig /Config/${CONFIG_FILE} -Logs /Logs/ -LoadAssembly Libraries/ResoniteModLoader.dll ${ADDITIONAL_ARGUMENTS}
else
dotnet Resonite.dll -HeadlessConfig /Config/${CONFIG_FILE} -Logs /Logs/ ${ADDITIONAL_ARGUMENTS}
fi
dotnet Resonite.dll -HeadlessConfig /Config/${CONFIG_FILE} -Logs /Logs/ ${ADDITIONAL_ARGUMENTS}
fi
22 changes: 15 additions & 7 deletions scripts/update-resonite.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
#!/bin/sh

HEADLESS_DIRECTORY="/home/container/Headless/net8.0"

/home/container/steamcmd/steamcmd.sh +login ${STEAM_USER} ${STEAM_PASS} +force_install_dir /home/container +app_update 2519830 -beta ${STEAM_BRANCH} -betapassword ${BETA_CODE} +quit

# Fix for issue with NVR.json migrations exploding
ln -sf /home/container/Migrations /home/container/Headless/Migrations

#Mod installation if ENABLE_MODS is true. Heavily inspired and pulled from work by Spex. Thank you
if [${ENABLE_MODS} = true]; then
cd /home/container/Headless/net8.0
mkdir rml_libs rml_mods rml_config Libraries
#Copy Mods and associated files from RML volume
cp -a /RML/rml_mods/. rml_mods/
cp -a /RML/rml_libs/. rml_libs/
cp -a /RML/rml_config/. rml/config/
if [ "${ENABLE_MODS}" = "true" ]; then

# Create Libraries directory for RML to live in
mkdir -p ${HEADLESS_DIRECTORY}/Libraries

# Create RML directories on RML volume, mods and config will be stored in here.
mkdir -p /RML/rml_mods /RML/rml_libs /RML/rml_config

# Symlink rml_mods, rml_libs and rml_config to where Resonite will read them.
ln -sf /RML/rml_mods ${HEADLESS_DIRECTORY}/rml_mods
ln -sf /RML/rml_libs ${HEADLESS_DIRECTORY}/rml_libs
ln -sf /RML/rml_config ${HEADLESS_DIRECTORY}/rml_config

# From: https://gist.github.com/steinwaywhw/a4cd19cda655b8249d908261a62687f8?permalink_comment_id=5097031#gistcomment-5097031
# Fetch the latest release version number for ResoniteModLoader
latest_version=$(curl -s https://api.github.com/repos/resonite-modding-group/ResoniteModLoader/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')
Expand Down

0 comments on commit 9b00dd4

Please sign in to comment.