rust: add support for Carbon, a rust modding framework (#43)
This commit is contained in:
parent
2d150d4260
commit
fc00b710fa
1 changed files with 14 additions and 3 deletions
|
@ -16,17 +16,28 @@ fi
|
|||
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
|
||||
echo ":/home/container$ ${MODIFIED_STARTUP}"
|
||||
|
||||
# OxideMod has been replaced with uMod
|
||||
if [ -f OXIDE_FLAG ] || [ "${OXIDE}" = 1 ] || [ "${UMOD}" = 1 ]; then
|
||||
if [[ "${FRAMEWORK}" == "carbon" ]]; then
|
||||
# Carbon: https://github.com/CarbonCommunity/Carbon.Core
|
||||
echo "Updating Carbon..."
|
||||
curl -sSL "https://github.com/CarbonCommunity/Carbon.Core/releases/download/production_build/Carbon.Linux.Release.tar.gz" | tar zx
|
||||
echo "Done updating Carbon!"
|
||||
|
||||
export DOORSTOP_ENABLED=1
|
||||
export DOORSTOP_TARGET_ASSEMBLY="$(pwd)/carbon/managed/Carbon.Preloader.dll"
|
||||
MODIFIED_STARTUP="LD_PRELOAD=$(pwd)/libdoorstop.so ${MODIFIED_STARTUP}"
|
||||
|
||||
elif [[ "$OXIDE" == "1" ]] || [[ "${FRAMEWORK}" == "oxide" ]]; then
|
||||
# Oxide: https://github.com/OxideMod/Oxide.Rust
|
||||
echo "Updating uMod..."
|
||||
curl -sSL "https://github.com/OxideMod/Oxide.Rust/releases/latest/download/Oxide.Rust-linux.zip" > umod.zip
|
||||
unzip -o -q umod.zip
|
||||
rm umod.zip
|
||||
echo "Done updating uMod!"
|
||||
# else Vanilla, do nothing
|
||||
fi
|
||||
|
||||
# Fix for Rust not starting
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)
|
||||
export LD_LIBRARY_PATH=$(pwd)/RustDedicated_Data/Plugins/x86_64:$(pwd)
|
||||
|
||||
# Run the Server
|
||||
node /wrapper.js "${MODIFIED_STARTUP}"
|
||||
|
|
Loading…
Reference in a new issue