diff options
author | David Walter Seikel | 2016-11-27 23:51:59 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-27 23:51:59 +1000 |
commit | c0ff56729a59dc30589de6af6120d825fbaa8cc3 (patch) | |
tree | 1c7e2f842548a5c9fef566d2045f3ad8aac603cb /scripts/start-sim | |
parent | White space and typo clean ups. (diff) | |
download | opensim-SC-c0ff56729a59dc30589de6af6120d825fbaa8cc3.zip opensim-SC-c0ff56729a59dc30589de6af6120d825fbaa8cc3.tar.gz opensim-SC-c0ff56729a59dc30589de6af6120d825fbaa8cc3.tar.bz2 opensim-SC-c0ff56729a59dc30589de6af6120d825fbaa8cc3.tar.xz |
Break out common script bits into their own file.
Diffstat (limited to '')
-rwxr-xr-x | scripts/start-sim | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/scripts/start-sim b/scripts/start-sim index ed2b07f..72bb9ba 100755 --- a/scripts/start-sim +++ b/scripts/start-sim | |||
@@ -1,21 +1,7 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | # Figure out where we are, most of this mess is to troll through soft links. | 3 | source common.sh |
4 | PRG="$0" | 4 | getPrgDir |
5 | while [ -h "${PRG}" ] ; do | ||
6 | ls=$(ls -ld "${PRG}") | ||
7 | link=`expr "${ls}" : '.*-> \(.*\)$'` | ||
8 | if expr "${link}" : '.*/.*' > /dev/null; then | ||
9 | PRG="${link}" | ||
10 | else | ||
11 | PRG=$(dirname "${PRG}")/"${link}" | ||
12 | fi | ||
13 | done | ||
14 | PRGDIR=$(dirname "${PRG}") | ||
15 | pushd ${PRGDIR} >/dev/null | ||
16 | PRGDIR=$(pwd) | ||
17 | popd >/dev/null | ||
18 | |||
19 | 5 | ||
20 | USER=$(whoami) | 6 | USER=$(whoami) |
21 | console_name="OpenSim_console" | 7 | console_name="OpenSim_console" |
@@ -78,7 +64,7 @@ if [ "x$tgt" = "xROBUST" ]; then | |||
78 | elif [ "x$inventory" = "x" ]; then | 64 | elif [ "x$inventory" = "x" ]; then |
79 | exe="OpenSim" | 65 | exe="OpenSim" |
80 | # Grab the first Section line of the sims .xml file, cut it down to the name. | 66 | # Grab the first Section line of the sims .xml file, cut it down to the name. |
81 | title=$(grep "<Section " ../config/${tgt}/*.xml | head -n 1 | cut -d '"' -f 2 ) | 67 | title=$(getSimName ${num}) |
82 | fi | 68 | fi |
83 | 69 | ||
84 | case $(basename $0) in | 70 | case $(basename $0) in |