Commits

Peter Szilagyi committed caa4675

CentOS 5 compatibility.

  • Participants
  • Parent commits c779be4

Comments (0)

Files changed (1)

 # with Sink: maintainer responsible to find arbitrary machines in
 # those offices and sink-install to the office filesystems via those
 # machines.  The offices are four: nyc, ldn, hkg, and tot.
-declare -A office_qwss
-office_qwss=([hkg]=r02 [ldn]=r01 [nyc]=r04 [tot]=r01)
+offices="hgk ldn nyc tot"
+host_hkg=hkg-qws-r02
+host_ldn=ldn-qws-r01
+host_nyc=nyc-qws-r04
+host_tot=tot-qws-r01
 
-declare -A mode_subdirs
-mode_subdirs=([prod]=prod [test]=dev)
+modes="prod test"
+target_prod=/j/office/app/emacs/prod
+target_test=/j/office/app/emacs/dev
+
+# (The CentOS 5 bash doesn't have associative arrays yet, hence going
+# old school for host_* and target_*.)
 
 set -e -u -o pipefail
 ulimit -c unlimited # allow arbitrarily large core files
   $(hg paths default)
     $(hg id -i)")"
 
-target=/j/office/app/emacs/${mode_subdirs[$mode]}
+eval target=target_\$$mode
 
 # Delete a few of the biggest wastes of space before sink'ing.
 # Really, need "sink deploy dir -exclude" to skip these.
 test -x "$dot/"../ocaml/omake/omake_server.exe
 
 ln -sf $(cd "$dot/".. && pwd) "$jane_elisp"
-for office in "${!office_qwss[@]}"
+for office in $offices
 do
-    host=$office-qws-${office_qwss[$office]}
+    eval host=host_\$$office
     #ssh "$host" "mkdir -p '$target'"
 
     # "sink deploy dir" doesn't work with weird directory names like