Document safe GitHub update command

This commit is contained in:
Зарубин Филипп
2026-06-23 18:35:28 +03:00
parent 419482c6ee
commit 93b2f49895
4 changed files with 19 additions and 1 deletions
+1
View File
@@ -12,6 +12,7 @@ __pycache__/
.mnemazine/quarantine/ .mnemazine/quarantine/
.mnemazine/backlog/ .mnemazine/backlog/
.mnemazine/owner-context.txt .mnemazine/owner-context.txt
.mnemazine/config.json
.mnemazine/config.env .mnemazine/config.env
.mnemazine/config.local.sh .mnemazine/config.local.sh
.mnemazine/.last-daily .mnemazine/.last-daily
+6
View File
@@ -72,6 +72,12 @@ asks where to put the `inbox/` (inside the repo or on the Desktop), and can
deploy the Telegram bot to a VPS. Preview a run without touching anything: deploy the Telegram bot to a VPS. Preview a run without touching anything:
`MNEMAZINE_SETUP_DRYRUN=1 bash setup.sh`. `MNEMAZINE_SETUP_DRYRUN=1 bash setup.sh`.
Update an existing clone:
```bash
cd "$HOME/Desktop/Mnemazine" && git pull --ff-only && bash install.sh
```
After installation, open this folder as an Obsidian vault: After installation, open this folder as an Obsidian vault:
```text ```text
+6
View File
@@ -71,6 +71,12 @@ bash setup.sh # пошагово, с вопросами (куда кла
(в репозитории или на рабочий стол), может задеплоить Telegram-бота на VPS. (в репозитории или на рабочий стол), может задеплоить Telegram-бота на VPS.
Прогон вхолостую без изменений: `MNEMAZINE_SETUP_DRYRUN=1 bash setup.sh`. Прогон вхолостую без изменений: `MNEMAZINE_SETUP_DRYRUN=1 bash setup.sh`.
Обновить уже скачанный проект:
```bash
cd "$HOME/Desktop/Mnemazine" && git pull --ff-only && bash install.sh
```
После установки откройте эту папку как Obsidian-vault: После установки откройте эту папку как Obsidian-vault:
```text ```text
+6 -1
View File
@@ -3,6 +3,7 @@ set -euo pipefail
# Default to where this script lives (the clone), not a hardcoded path. # Default to where this script lives (the clone), not a hardcoded path.
ROOT="${MNEMAZINE_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" ROOT="${MNEMAZINE_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
[ -f "$ROOT/.mnemazine/config.local.sh" ] && . "$ROOT/.mnemazine/config.local.sh"
INBOX="${MNEMAZINE_INBOX:-$ROOT/inbox}" INBOX="${MNEMAZINE_INBOX:-$ROOT/inbox}"
VAULT="${MNEMAZINE_VAULT:-$ROOT/vault}" VAULT="${MNEMAZINE_VAULT:-$ROOT/vault}"
REPORTS="${MNEMAZINE_REPORTS:-$ROOT/reports}" REPORTS="${MNEMAZINE_REPORTS:-$ROOT/reports}"
@@ -64,11 +65,15 @@ cat > "$ROOT/.mnemazine/config.json" <<EOF
} }
EOF EOF
cat > "$ROOT/.mnemazine/config.local.sh" <<EOF if [ ! -f "$ROOT/.mnemazine/config.local.sh" ]; then
cat > "$ROOT/.mnemazine/config.local.sh" <<EOF
# Non-secret local paths. Safe to edit. # Non-secret local paths. Safe to edit.
export MNEMAZINE_INBOX="$INBOX" export MNEMAZINE_INBOX="$INBOX"
export MNEMAZINE_VAULT="$VAULT" export MNEMAZINE_VAULT="$VAULT"
EOF EOF
else
echo "Local config preserved: $ROOT/.mnemazine/config.local.sh"
fi
if [ -f "$ROOT/bin/mnemazine" ]; then if [ -f "$ROOT/bin/mnemazine" ]; then
chmod +x "$ROOT/bin/mnemazine" chmod +x "$ROOT/bin/mnemazine"