From 39264f7179664fdf76f2f1076350dbbb192fd81b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=97=D0=B0=D1=80=D1=83=D0=B1=D0=B8=D0=BD=20=D0=A4=D0=B8?= =?UTF-8?q?=D0=BB=D0=B8=D0=BF=D0=BF?= <289370046+zarubinphil@users.noreply.github.com> Date: Fri, 19 Jun 2026 19:43:00 +0300 Subject: [PATCH] fix(onboarding): greeting prints at true end, not buried mid-install setup.sh (the README-default path) ran install.sh as a mid-flow step, so its author greeting scrolled past under stages 4-7 and users never saw it. - scripts/hello.sh: single source of the bilingual greeting. - install.sh: greet only when run directly; silent under MNEMAZINE_FROM_SETUP. - setup.sh: pass that flag, print the greeting itself as the last line. --- install.sh | 31 +++---------------------------- scripts/hello.sh | 32 ++++++++++++++++++++++++++++++++ setup.sh | 6 +++++- 3 files changed, 40 insertions(+), 29 deletions(-) create mode 100644 scripts/hello.sh diff --git a/install.sh b/install.sh index 6514403..812402e 100755 --- a/install.sh +++ b/install.sh @@ -68,31 +68,6 @@ echo "Inbox: $INBOX" echo "Vault: $VAULT" echo "Open the vault folder in Obsidian." -cat <<'EOF' - -──────────────────────────────────────────────────────────── -Привет! Это Philipp — автор Мнемазины. - -Спасибо, что ставите мою разработку. Я делал её, чтобы сырьё -превращалось в проверенное, готовое к работе знание — и рад, -что теперь она будет помогать и вам. - -★ Если зашло — поставьте звезду на GitHub, мне это правда важно: - https://github.com/zarubinphil/Mnemazine -💡 Есть идея, как сделать лучше? Откройте issue или PR — - предлагайте улучшения, я читаю каждое. - -— — — - -Hi! This is Philipp — the author of Mnemazine. - -Thank you for installing my project. I built it to turn raw -input into verified, ready-to-use knowledge — glad it will now -help you too. - -★ If you like it, please star it on GitHub — it truly helps: - https://github.com/zarubinphil/Mnemazine -💡 Got an idea to make it better? Open an issue or PR — - improvements are always welcome, I read every one. -──────────────────────────────────────────────────────────── -EOF +# Greet only when run directly. Under setup.sh this is a mid-flow sub-step; +# setup.sh prints the greeting itself at its true end so it is not buried. +[ "${MNEMAZINE_FROM_SETUP:-0}" = "1" ] || bash "$ROOT/scripts/hello.sh" diff --git a/scripts/hello.sh b/scripts/hello.sh new file mode 100644 index 0000000..5a8abc1 --- /dev/null +++ b/scripts/hello.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# Bilingual greeting from the author. Printed at the true end of the entry +# point (install.sh when run directly, setup.sh when guided) so it is the last +# thing the user sees, not buried mid-install. +cat <<'EOF' + +──────────────────────────────────────────────────────────── +Привет! Это Philipp — автор Мнемазины. + +Спасибо, что ставите мою разработку. Я делал её, чтобы сырьё +превращалось в проверенное, готовое к работе знание — и рад, +что теперь она будет помогать и вам. + +★ Если зашло — поставьте звезду на GitHub, мне это правда важно: + https://github.com/zarubinphil/Mnemazine +💡 Есть идея, как сделать лучше? Откройте issue или PR — + предлагайте улучшения, я читаю каждое. + +— — — + +Hi! This is Philipp — the author of Mnemazine. + +Thank you for installing my project. I built it to turn raw +input into verified, ready-to-use knowledge — glad it will now +help you too. + +★ If you like it, please star it on GitHub — it truly helps: + https://github.com/zarubinphil/Mnemazine +💡 Got an idea to make it better? Open an issue or PR — + improvements are always welcome, I read every one. +──────────────────────────────────────────────────────────── +EOF diff --git a/setup.sh b/setup.sh index 4629001..1b6bbce 100755 --- a/setup.sh +++ b/setup.sh @@ -136,7 +136,7 @@ fi # ---- Stage 6: build the skeleton ------------------------------------------- stage 6 "Ставлю каркас Mnemazine" ok "Запускаю install.sh (vault, папки, venv, OCR-сборка)…" -if ! MNEMAZINE_ROOT="$ROOT" MNEMAZINE_INBOX="$INBOX" run bash "$ROOT/install.sh"; then +if ! MNEMAZINE_FROM_SETUP=1 MNEMAZINE_ROOT="$ROOT" MNEMAZINE_INBOX="$INBOX" run bash "$ROOT/install.sh"; then no "install.sh завершился с ошибкой — каркас не собран." halt fi @@ -183,3 +183,7 @@ note "Открой папку vault в Obsidian." note "Прогон: cd $ROOT && npm run run (deep: npm run run -- --deep)" [ "$BOT_MODE" = "vps" ] && note "Mini App + ежедневный pull: см. docs/telegram-intake.md (этапы 2-3)." b "Всё. Пользуйся." + +# Author greeting last, so it is what the user sees at the end (not buried +# mid-flow inside install.sh, which stays silent under MNEMAZINE_FROM_SETUP). +[ "$DRY" = "1" ] || bash "$ROOT/scripts/hello.sh"