diff options
Diffstat (limited to '')
-rwxr-xr-x | scripts/common.sh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/scripts/common.sh b/scripts/common.sh index 2ec19ce..6aeb8b5 100755 --- a/scripts/common.sh +++ b/scripts/common.sh | |||
@@ -1,5 +1,7 @@ | |||
1 | #!/bin/echo Don't run this file, it's for common functions." | 1 | #!/bin/echo Don't run this file, it's for common functions." |
2 | 2 | ||
3 | OS_PATH="/opt/opensim_SC" | ||
4 | OS_USER="opensimsc" | ||
3 | 5 | ||
4 | # Figure out where we are, most of this mess is to troll through soft links. | 6 | # Figure out where we are, most of this mess is to troll through soft links. |
5 | # PRGDIR=$(getPrgDir) | 7 | # PRGDIR=$(getPrgDir) |
@@ -26,9 +28,7 @@ getPrgDir() | |||
26 | # name=$(num2name 1) | 28 | # name=$(num2name 1) |
27 | num2name() | 29 | num2name() |
28 | { | 30 | { |
29 | # Using a string format, coz using a number format ends with an octal error, coz 08 isn't a valid octal number. | 31 | /usr/bin/printf 'sim%02d' "$1" |
30 | # Why isn't octal dead already? | ||
31 | printf 'sim%02s' "$1" | ||
32 | } | 32 | } |
33 | 33 | ||
34 | 34 | ||
@@ -40,11 +40,11 @@ sanitize() | |||
40 | } | 40 | } |
41 | 41 | ||
42 | 42 | ||
43 | # Grab the first Section line of the sims .xml file, cut it down to the name. | 43 | # Grab the first Section line of the sims .ini file, cut it down to the name. |
44 | # name=$(getSimName 1) | 44 | # name=$(getSimName 1) |
45 | getSimName() | 45 | getSimName() |
46 | { | 46 | { |
47 | grep "<Section " ${PRGDIR}/../../config/$(num2name $1)/*.xml | head -n 1 | cut -d '"' -f 2 | 47 | grep "RegionName" ${PRGDIR}/../../config/sim$1/*.ini | head -n 1 | cut -d '"' -f 2 |
48 | } | 48 | } |
49 | 49 | ||
50 | 50 | ||
@@ -73,4 +73,3 @@ sleepPerSize() | |||
73 | echo 200 | 73 | echo 200 |
74 | fi | 74 | fi |
75 | } | 75 | } |
76 | |||