aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2021-08-10 17:27:16 +1000
committeronefang2021-08-10 17:27:16 +1000
commit0813a911a58763a2473eab402ce1c8d3a2658fe0 (patch)
treefb0d25177f94732d8b041bd2ef4abad1ec868d6f
parentUPdate the help text, and related comments. (diff)
downloadopensim-SC-0813a911a58763a2473eab402ce1c8d3a2658fe0.zip
opensim-SC-0813a911a58763a2473eab402ce1c8d3a2658fe0.tar.gz
opensim-SC-0813a911a58763a2473eab402ce1c8d3a2658fe0.tar.bz2
opensim-SC-0813a911a58763a2473eab402ce1c8d3a2658fe0.tar.xz
Cleanly symlink the executable by removing it if it exists already.
-rw-r--r--src/sledjchisl/sledjchisl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c
index 405da6a..ca2927e 100644
--- a/src/sledjchisl/sledjchisl.c
+++ b/src/sledjchisl/sledjchisl.c
@@ -7700,6 +7700,12 @@ jit library is loaded or the JIT compiler will not be activated.
7700 char *newPath = xmprintf("%s/current/bin/sledjchisl", scRoot); 7700 char *newPath = xmprintf("%s/current/bin/sledjchisl", scRoot);
7701 tmp = xmprintf("%s/sledjchisl", scBin); 7701 tmp = xmprintf("%s/sledjchisl", scBin);
7702 I("Symlinking %s to %s", newPath, tmp); 7702 I("Symlinking %s to %s", newPath, tmp);
7703 if (qfile_exist(tmp))
7704 {
7705 snprintf(toybuf, sizeof(toybuf), "rm %s", tmp);
7706 if (!WIFEXITED(system(toybuf)))
7707 E("rm command failed!");
7708 }
7703 if (0 != symlink(newPath, tmp)) 7709 if (0 != symlink(newPath, tmp))
7704 perror_msg("Symlinking %s to %s", newPath, tmp); 7710 perror_msg("Symlinking %s to %s", newPath, tmp);
7705 free(tmp); 7711 free(tmp);