#!/bin/bash # Terminal harness; the GUI is launched with aesel. set -euo pipefail script_path="${BASH_SOURCE[0]}" launch_directory="$PWD" [[ "$script_path" == /* ]] || script_path="$PWD/$script_path" while [[ -L "$script_path" ]]; do cd -P "${script_path%/*}" script_directory="$PWD" link_target="$(command -p readlink "$script_path")" if [[ "$link_target" == /* ]]; then script_path="$link_target"; else script_path="$script_directory/$link_target"; fi done cd "$launch_directory" case "${1:-}" in --help|-h|help|--version|-V|version|doctor|history) ;; *) set -- --pro "$@" ;; esac # Stay in this shell until the shared launcher execs the selected runtime. # Sourcing also lets the Mac app use its bundled Node without a system install. source "${script_path%/*}/easel"