f7c64427fb9a
update install.sh: rename to NixOS Intuitive Navigation Assistant, fix prompt to always fire via /dev/tty, add post-install onboarding with color and spacing
- time
- 2026-06-08 09:49 UTC · 4 months ago
- machine
- koh2
- agent
- claude-sonnet-4-6
- session
- install.sh polish
- parent
- 5f7a024da0cf
↓ nina-f7c64427.tar.gzatlas at this save
files changed1 file
install.sh+46 −33install.sh+46 −33
@@ -1,48 +1,61 @@11 #!/bin/sh22 set -e33 4-banner() {5- cat <<'BANNER'4+# ANSI color codes — empty when stdout/stderr is not a terminal5+if [ -t 2 ]; then6+ BOLD='\033[1m'7+ DIM='\033[2m'8+ CYAN='\033[36m'9+ GREEN='\033[32m'10+ YELLOW='\033[33m'11+ RESET='\033[0m'12+else13+ BOLD='' DIM='' CYAN='' GREEN='' YELLOW='' RESET=''14+fi615 7- _8- _ __ (_)_ __ __ _9- | '_ \| | '_ \ / _` |10- | | | | | | | | (_| |11- |_| |_|_|_| |_|\__,_|16+INSTALL_CMD="nix profile add https://kepr.uk/nina/archive/HEAD.tar.gz"1217 13- NixOS helper · kepr.uk/nina14-15-BANNER18+banner() {19+ printf >&2 '\n'20+ printf >&2 "${CYAN} _${RESET}\n"21+ printf >&2 "${CYAN} _ __ (_)_ __ __ _${RESET}\n"22+ printf >&2 "${CYAN} | '_ \\| | '_ \\ / _\` |${RESET}\n"23+ printf >&2 "${CYAN} | | | | | | | | (_| |${RESET}\n"24+ printf >&2 "${CYAN} |_| |_|_|_| |_|\\__,_|${RESET}\n"25+ printf >&2 '\n'26+ printf >&2 " ${BOLD}NixOS Intuitive Navigation Assistant${RESET} ${DIM}·${RESET} ${DIM}kepr.uk/nina${RESET}\n"27+ printf >&2 '\n'1628 }1729 18-INSTALL_CMD="nix profile add https://kepr.uk/nina/archive/HEAD.tar.gz"19-2030 main() {21- banner >&231+ banner2232 23- cat >&2 <<'EOF'24- The install script has been discontinued.33+ printf >&2 " nina is installed directly with nix:\n\n"34+ printf >&2 " ${YELLOW}%s${RESET}\n\n" "$INSTALL_CMD"2535 26- nina is now installed directly with nix — no script needed:36+ # Always prompt via /dev/tty so this works when piped through curl | sh37+ printf >&2 " Run it now? [Y/n] "38+ read -r answer </dev/tty39+ case "${answer:-y}" in40+ [nN]*)41+ printf >&2 '\n Copy the command above and run it whenever you are ready.\n\n'42+ exit 043+ ;;44+ esac45+ printf >&2 '\n'2746 28-EOF29-30- printf ' %s\n\n' "$INSTALL_CMD" >&231-32- if [ -t 0 ]; then33- printf ' Run it now? [Y/n] ' >&234- read -r answer >&2 </dev/tty35- case "${answer:-y}" in36- [nN]*)37- printf '\n Copy the command above and run it whenever you are ready.\n\n' >&238- exit 039- ;;40- esac41- printf '\n' >&242- fi43-4447 nix profile add https://kepr.uk/nina/archive/HEAD.tar.gz45- printf '\n Done. Try: nina --version\n\n' >&248+49+ printf >&2 '\n'50+ printf >&2 " ${GREEN}${BOLD}✓ Thank you for installing nina!${RESET}\n"51+ printf >&2 '\n'52+ printf >&2 " ${BOLD}Getting started${RESET}\n\n"53+ printf >&2 " ${CYAN}nina help${RESET} — explore what nina can do\n"54+ printf >&2 " ${CYAN}nina goodbye${RESET} — remove nina cleanly if it's not a good fit\n"55+ printf >&2 '\n'56+ printf >&2 " ${BOLD}Issues & feedback${RESET}\n\n"57+ printf >&2 " ${DIM}https://${RESET}kepr.uk/nina ${DIM}— no account required${RESET}\n"58+ printf >&2 '\n'4659 }4760 4861 main