aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2019-07-04 18:16:18 +1000
committeronefang2019-07-04 18:16:18 +1000
commita7219bab0de6c1e22d99cf722b8e588427a012ad (patch)
tree5f3a658ebfb2816769ecb684ef374b1cedba402e
parentMove the MG configs to their own file. (diff)
downloadopensim-SC_OLD-a7219bab0de6c1e22d99cf722b8e588427a012ad.zip
opensim-SC_OLD-a7219bab0de6c1e22d99cf722b8e588427a012ad.tar.gz
opensim-SC_OLD-a7219bab0de6c1e22d99cf722b8e588427a012ad.tar.bz2
opensim-SC_OLD-a7219bab0de6c1e22d99cf722b8e588427a012ad.tar.xz
Silly script to get around the lack of includes in ROBUST.
This'll be temporary until I get around to adding includes to ROBUST.
-rwxr-xr-xscripts/robust-include11
-rwxr-xr-xscripts/start-sim9
2 files changed, 16 insertions, 4 deletions
diff --git a/scripts/robust-include b/scripts/robust-include
new file mode 100755
index 0000000..e427eb1
--- /dev/null
+++ b/scripts/robust-include
@@ -0,0 +1,11 @@
1#!/bin/bash
2
3# Silly script to get around the lack of includes in ROBUST.
4
5source common.sh
6getPrgDir
7
8# The problem here is that the > bit is executed as the user, not as opensim.
9cat ${PRGDIR}/../../config/config.ini ${PRGDIR}/../bin/Robust.ini >${PRGDIR}/../../config/Robust.ini
10chown -R ${OS_USER}:${OS_USER} ${PRGDIR}/../../config/Robust.ini
11chmod 600 ${PRGDIR}/../../config/Robust.ini
diff --git a/scripts/start-sim b/scripts/start-sim
index 4bcc803..1414826 100755
--- a/scripts/start-sim
+++ b/scripts/start-sim
@@ -22,6 +22,7 @@ function wait_for_text()
22 done 22 done
23} 23}
24 24
25
25if [ $USER = "${OS_USER}" ] 26if [ $USER = "${OS_USER}" ]
26then 27then
27 SUDO="" 28 SUDO=""
@@ -91,10 +92,10 @@ case $(basename $0) in
91 if [ ! -e ${PRGDIR}/../../caches/${tgt}.pid ] 92 if [ ! -e ${PRGDIR}/../../caches/${tgt}.pid ]
92 then 93 then
93 if [ "x$tgt" = "xROBUST" ]; then 94 if [ "x$tgt" = "xROBUST" ]; then
94# TODO - the problem here is that the > bit is executed as the user, not as opensim. 95 pushd ${PRGDIR}/../scripts
95 $SUDO cat ${PRGDIR}/../../config/config.ini ${PRGDIR}/../../config/Robust.ini.template >${PRGDIR}/../../config/Robust.ini 96 $SUDO ./robust-include
96# $SUDO chown -R ${OS_USER}:${OS_USER} ${PRGDIR}/../../config/Robust.ini 97 popd
97 chmod 640 ${PRGDIR}/../../config/Robust.ini 98 cmd="${cmd} -inifile=${PRGDIR}/../../config/Robust.ini"
98 ${tmux_command} split-window -hp 50 -t "${tmux_session}:" "${cmd}" 99 ${tmux_command} split-window -hp 50 -t "${tmux_session}:" "${cmd}"
99 else 100 else
100 ${tmux_command} new-window -dn "${title}" -t "${tmux_session}:${num}" "${cmd}" 101 ${tmux_command} new-window -dn "${title}" -t "${tmux_session}:${num}" "${cmd}"