Commits

Peter Szilagyi committed c3670b2

bin/install.sh: More tweaking and worked around a bug in "sink deploy dir".

Comments (0)

Files changed (1)

     read
 fi
 
-dot=$(dirname "$0")/            # for script-relative filenames
+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)")"
+#
+# This has to be pretty narrow to look good in "sink history list".
+message="$(pwd):
+  $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
+target=/j/office/app/emacs/${mode_subdirs[$mode]}
+
+# Delete a few of the biggest wastes of space before sink'ing.
+# Really, need "sink deploy dir -exclude" to skip these.
+# (Fortunately, "sink deploy dir" does already exclude ../.hg.)
+find "$dot/".. \( \
+    -name '.nfs*' -o \
+    -name '*.cm[xit]' -o \
+    -name 'doit.exe' \) -print0 | xargs -r0tn1 rm
+
+temp=$(mktemp -d)
+trap 'rm -r "$temp"' 0
+jane_elisp=$temp/jane-elisp
 
 set -x
 
 #(cd "$dot/".. && omake)
 test -x "$dot/"../ocaml/omake/omake_server.exe
 
-for office in "${!office_qwss[@]}"; do
+ln -sf $(cd "$dot/".. && pwd) "$jane_elisp"
+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"
+
+    # "sink deploy dir" doesn't work with weird directory names like
+    # "bin/.." (yet) and doesn't rename directories as it installs
+    # them (instead, the target is a directory into which to install,
+    # not a new name).
+    #
+    #sink deploy dir "$dot/".. "$host:$target/jane-elisp" -message "$message"
+    sink deploy dir "$jane_elisp" "$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.