@@ -7,6 +7,12 @@
7# host manifest with that absolute path and the pinned extension ID, then installs the fm schemas
7# host manifest with that absolute path and the pinned extension ID, then installs the fm schemas
8# and runs the self-test. Safe to re-run.
8# and runs the self-test. Safe to re-run.
9set -euo pipefail
9set -euo pipefail
10+# Keep a copy of this run's output for diagnosis (brew's own output scrolls away).
11+LOG_DIR="$HOME/Library/Logs/Diagonal"
12+if mkdir -p "$LOG_DIR" 2>/dev/null; then
13+ exec > >(tee "$LOG_DIR/install.log") 2>&1
14+ echo "$(date '+%Y-%m-%d %H:%M:%S') install-host from $0 (HOME=$HOME PATH=$PATH)"
10trap 'echo "Diagonal host install failed at line $LINENO: $BASH_COMMAND" >&2' ERR
16trap 'echo "Diagonal host install failed at line $LINENO: $BASH_COMMAND" >&2' ERR
11HERE="$(cd "$(dirname "$0")" && pwd)"
17HERE="$(cd "$(dirname "$0")" && pwd)"
12if [[ -d "$HERE/host" ]]; then cd "$HERE"; else cd "$HERE/.."; fi
18if [[ -d "$HERE/host" ]]; then cd "$HERE"; else cd "$HERE/.."; fi