Files
agent-framework/update.sh
T
gitea 502f47eb21 Refactor: rename framework files to dot-prefixed lowercase, fix onboarding references, validate VRAM detection
- Rename AGENT.md -> .agent.md, RULES.md -> .rules.md, ONBOARDING.md -> .onboarding.md
- Rename BUG_REPORT.md -> .bug_report.md, ADVERSARIAL_BUG_REPORT.md -> .adversarial_bug_report.md, VERDICT.md -> .verdict.md
- Fix onboarding.md references to use new .onboarding.md path
- Fix stop-hook-pattern.md reference to use .onboarding.md
- Update README.md, config.md, install.sh, update.sh, prompts/*, references/*
- VRAM detection script validated and working
2026-06-12 12:40:15 -04:00

45 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
set -e
FRAMEWORK_DIR="$HOME/.automaton"
if [ ! -d "$FRAMEWORK_DIR" ]; then
echo "ERROR: automaton not installed at $FRAMEWORK_DIR"
echo "Run './install.sh' first."
exit 1
fi
echo "Updating automaton at $FRAMEWORK_DIR..."
cd "$FRAMEWORK_DIR"
# Check if it's a git repo
if [ ! -d ".git" ]; then
echo "ERROR: $FRAMEWORK_DIR is not a git repository."
echo "Cannot update. Please reinstall from git."
exit 1
fi
# Fetch latest changes
git fetch origin
echo ""
# Check for local changes
if ! git diff --quiet HEAD; then
echo "WARNING: You have uncommitted changes in $FRAMEWORK_DIR."
echo "These will be lost when pulling updates."
read -p "Do you want to discard your local changes and update? (y/N) " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Update cancelled."
exit 1
fi
git reset --hard HEAD
fi
# Pull latest changes
git pull origin main
echo ""
echo "Update complete."
echo "You can check for breaking changes at: https://gitea.yourdomain.com/hermes/automaton"