Peter Szilagyi avatar Peter Szilagyi committed e778c05

Tweaked installation some more: Simpler config, more checks, less building.

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_hosts
-office_hosts=(
-    [hkg]=hkg-qws-r02
-    [ldn]=ldn-qws-r02
-    [nyc]=nyc-qws-r02
-    [tot]=tot-qws-r02
-)
+declare -A office_qwss
+office_qwss=([hkg]=r02 [ldn]=r01 [nyc]=r04 [tot]=r01)
 
-mode_targets=(
-    [prod]=/j/office/app/emacs/prod/jane-elisp
-    [test]=/j/office/app/emacs/dev/jane-elisp
-)
+declare -A mode_subdirs
+mode_subdirs=([prod]=prod [test]=dev)
 
 set -e -u -o pipefail
 ulimit -c unlimited # allow arbitrarily large core files
 done
 
 if [ $mode = "prod" ]; then
+    test -t 1 -a -t 0
     echo "You are about to install a new PRODUCTION version of omake-emacs."
     echo -n "Press ENTER to proceed, Ctrl-C to abort. "
     read
 fi
 
+dot=$(dirname "$0")/            # for script-relative filenames
+
+# Log the cwd and command and some version information.
+message="$(pwd)/$(basename "$0") $*
+$(cd "$dot/".. && echo "$(pwd) : $(hg paths default) $(hg id -i)")
+$(cd "$dot/"../.. && echo "$(pwd) : $(hg paths default) $(hg id -i)")"
+
+target=/j/office/app/emacs/${mode_subdirs[$mode]}/jane-elisp
+
 set -x
 
-cd "$(dirname "$0")"            # relative filenames
+make -C "$dot/"../doc
 
-make -C ../doc
-make -C ../elisp/contrib        # auctex (autoloads)
-(cd .. && omake)
+# This should be run from a functioning, built checkout, where the
+# developer has already run the following.
 
-for office in "${!office_hosts[@]}"; do
-    sink deploy dir -dry-run .. "${office_hosts[$office]}:${mode_targets[$mode]}"
+#make -C "$dot/"../elisp/contrib
+test -r "$dot/"../elisp/contrib/tex-site.el
+test .elcs= = .elcs="$(find "$dot/".. -name '*.elc')"
+
+#(cd "$dot/".. && omake)
+test -x "$dot/"../ocaml/omake/omake_server.exe
+
+for office in "${!office_qwss[@]}"; do
+    host=$office-qws-${office_qwss[$office]}
+    #ssh "$host" "mkdir -p '$target'"
+    sink deploy dir "$dot/".. "$host:$target" -message "$message"
 done
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.