From bbeb7f22b713104ae49984d1c5ed71224e729803 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 25 Nov 2023 01:18:33 +0000 Subject: [PATCH] fix(nmrih): add if statements for symlink fixes This commit fixes an issue where certain server files were missing. Symbolic links are now created for the following files if they do not already exist: vphysics.so, studiorender.so, soundemittersystem.so, shaderapiempty.so, scenefilecache.so, replay.so, and materialsystem.so. --- lgsm/modules/fix_nmrih.sh | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/lgsm/modules/fix_nmrih.sh b/lgsm/modules/fix_nmrih.sh index 83a5ad4120..dfbb76d92b 100644 --- a/lgsm/modules/fix_nmrih.sh +++ b/lgsm/modules/fix_nmrih.sh @@ -8,10 +8,24 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so" -ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so" -ln -s "${serverfiles}/bin/soundemittersystem_srv.so" "${serverfiles}/bin/soundemittersystem.so" -ln -s "${serverfiles}/bin/shaderapiempty_srv.so" "${serverfiles}/bin/shaderapiempty.so" -ln -s "${serverfiles}/bin/scenefilecache_srv.so" "${serverfiles}/bin/scenefilecache.so" -ln -s "${serverfiles}/bin/replay_srv.so" "${serverfiles}/bin/replay.so" -ln -s "${serverfiles}/bin/materialsystem_srv.so" "${serverfiles}/bin/materialsystem.so" +if [ ! -f "${serverfiles}/bin/vphysics.so" ]; then + ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so" +fi +if [ ! -f "${serverfiles}/bin/studiorender.so" ]; then + ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so" +fi +if [ ! -f "${serverfiles}/bin/soundemittersystem.so" ]; then + ln -s "${serverfiles}/bin/soundemittersystem_srv.so" "${serverfiles}/bin/soundemittersystem.so" +fi +if [ ! -f "${serverfiles}/bin/shaderapiempty.so" ]; then + ln -s "${serverfiles}/bin/shaderapiempty_srv.so" "${serverfiles}/bin/shaderapiempty.so" +fi +if [ ! -f "${serverfiles}/bin/scenefilecache.so" ]; then + ln -s "${serverfiles}/bin/scenefilecache_srv.so" "${serverfiles}/bin/scenefilecache.so" +fi +if [ ! -f "${serverfiles}/bin/replay.so" ]; then + ln -s "${serverfiles}/bin/replay_srv.so" "${serverfiles}/bin/replay.so" +fi +if [ ! -f "${serverfiles}/bin/materialsystem.so" ]; then + ln -s "${serverfiles}/bin/materialsystem_srv.so" "${serverfiles}/bin/materialsystem.so" +fi