1. Yaron Minsky
  2. js-elisp

Commits

Peter Szilagyi  committed e4f2f07

Draft of new install using sink.

  • Participants
  • Parent commits 46a9987
  • Branches default

Comments (0)

Files changed (1)

File bin/install.sh

View file
  • Ignore whitespace
 #!/bin/bash
 
-# CR pszilagyi: The /mnt/global/base path below is out of date
-# w.r.t. the imminent /j/office/app/emacs/{prod,dev}/jane-elisp
-# deployment regime.
-#
 # The word from Kilburg and cwills re. how to install in all offices
 # 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_hosts
+office_hosts=(
+    [hkg]=hkg-qws-r02
+    [ldn]=ldn-qws-r02
+    [nyc]=nyc-qws-r02
+    [tot]=tot-qws-r02
+)
 
-# CR pszilagyi: Also, with all the code now checked into
-# ../elisp/contrib, we'll have more doc to build on install.
-#
-# Also, n.b., auctex requires a "make" to work (autoloads).
+mode_targets=(
+    [prod]=/j/office/app/emacs/prod/jane-elisp
+    [test]=/j/office/app/emacs/dev/jane-elisp
+)
 
 set -e -u -o pipefail
 ulimit -c unlimited # allow arbitrarily large core files
 
+PATH=$PATH:/j/office/app/sink/prod/bin # sink
+
 mode=test
-for arg in "$@"; do
+dry_run=-dry_run
+offices=${!office_hosts[*]}
+while test $# -gt 0; do
+    arg=$1
+    shift
     case $arg in
         -prod)
             mode=prod
         -test)
             mode=test
             ;;
+        -wet-run)
+            dry_run=
+            ;;
+        -offices)
+            offices=$1
+            shift
+            ;;
         *)
             echo "Unknown argument: $arg"
             exit 2
     read
 fi
 
+set -x
+
 make -C doc
+make -C elisp/contrib           # auctex (autoloads)
 
-exe=omake_server.exe
-
-echo "Installing $exe for mode: $mode"
-
-case $mode in
-    prod)
-        installed_exe=$exe
-        ;;
-    test)
-        installed_exe=omake_server_test.exe
-        ;;
-esac
-
-hg push ssh://hg2//hg/jane-elisp/roll-$mode
-jadmin install to-merge -loc 'hkg,ldn,nyc' \
-    ocaml/omake/$exe \
-    /mnt/global/base/bin/$installed_exe \
-    ;
+for office in $offices; do
+    $sink deploy dir . "${office_hosts[$office]}:${mode_targets[$mode]}"
+done