#!/bin/sh # Joxo, from a terminal, for the folder you are in: # # curl -fsSL https://joxo.ai/install | sh # # It runs https://joxo.ai/setup.sh (the script every Joxo setup line runs; read it first if you like) # with --yes: Node.js if this computer has none (for Joxo alone, checked against nodejs.org), the # connector (checked against the SHA-256 in https://joxo.ai/setup-manifest.json), the joxo command, and # then joxo connect --yes, which opens your browser to sign in once and connects this folder. # It never uses sudo and never stops to ask anything here. Pass a setup or invitation link after # "sh -s --" to use one. set -eu joxo_origin="${JOXO_URL:-https://joxo.ai}" joxo_setup= if command -v curl >/dev/null 2>&1; then joxo_setup=$(curl -fsSL "$joxo_origin/setup.sh") || joxo_setup= elif command -v wget >/dev/null 2>&1; then joxo_setup=$(wget -qO- "$joxo_origin/setup.sh") || joxo_setup= else printf 'Joxo: install curl or wget, then run this again.\n' >&2; exit 1 fi case "$joxo_setup" in '#!/bin/sh'*) ;; *) printf 'Joxo: %s/setup.sh did not answer with the setup script. Try again in a minute.\n' "$joxo_origin" >&2; exit 1 ;; esac if [ "$joxo_origin" != "https://joxo.ai" ]; then JOXO_URL="$joxo_origin"; export JOXO_URL; fi exec sh -c "$joxo_setup" joxo-setup --yes "$@"