aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/common.sh
diff options
context:
space:
mode:
authoronefang2019-08-13 01:00:58 +1000
committeronefang2019-08-13 01:00:58 +1000
commit8c34b5efe171e9f3b6daf3cefd319872684d121f (patch)
treead93a4632b3fa19d18700ace79a2099842869b41 /scripts/common.sh
parentRemove the left overs from the check4096 crap that is obsolete. (diff)
downloadopensim-SC_OLD-8c34b5efe171e9f3b6daf3cefd319872684d121f.zip
opensim-SC_OLD-8c34b5efe171e9f3b6daf3cefd319872684d121f.tar.gz
opensim-SC_OLD-8c34b5efe171e9f3b6daf3cefd319872684d121f.tar.bz2
opensim-SC_OLD-8c34b5efe171e9f3b6daf3cefd319872684d121f.tar.xz
Stop using num2name() in scripts.
Turns out I was feeding "01" to it, so that's why it thought things where octal, and "01" is the result we wanted anyway.
Diffstat (limited to 'scripts/common.sh')
-rwxr-xr-xscripts/common.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/common.sh b/scripts/common.sh
index 9d985f2..6aeb8b5 100755
--- a/scripts/common.sh
+++ b/scripts/common.sh
@@ -28,9 +28,7 @@ getPrgDir()
28# name=$(num2name 1) 28# name=$(num2name 1)
29num2name() 29num2name()
30{ 30{
31 # 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"
32 # Why isn't octal dead already?
33 printf 'sim%02s' "$1"
34} 32}
35 33
36 34
@@ -46,7 +44,7 @@ sanitize()
46# name=$(getSimName 1) 44# name=$(getSimName 1)
47getSimName() 45getSimName()
48{ 46{
49 grep "RegionName" ${PRGDIR}/../../config/$(num2name $1)/*.ini | head -n 1 | cut -d '"' -f 2 47 grep "RegionName" ${PRGDIR}/../../config/sim$1/*.ini | head -n 1 | cut -d '"' -f 2
50} 48}
51 49
52 50