Files
openclaw/tools/daily-update.sh
Clawd Bot ca9b510922 chore: align with upstream openclaw/openclaw and overlay local additions
- Reset master to upstream/main (16,697 commits)
- Overlay 2,271 local-only files (skills, tools, workspace, configs, apps)
- Restore IDENTITY.md and USER.md templates
- Build verified, gateway running, Discord working

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 07:40:46 +01:00

26 lines
1010 B
Bash

#!/bin/bash
# Daily OpenClaw + Claude Code update (silent unless new version)
CURRENT=$(openclaw --version 2>/dev/null | grep -oP '\d{4}\.\d+\.\d+(-\d+)?' || echo "unknown")
OUTPUT=$(openclaw update --yes --no-restart 2>&1)
NEW=$(openclaw --version 2>/dev/null | grep -oP '\d{4}\.\d+\.\d+(-\d+)?' || echo "unknown")
if [ "$CURRENT" != "$NEW" ]; then
echo "[$(date)] Updated: $CURRENT$NEW"
# Genstart gateway efter update
systemctl restart openclaw 2>/dev/null || openclaw restart 2>/dev/null || true
echo "[$(date)] Gateway restarted"
else
echo "[$(date)] Already up to date: $CURRENT"
fi
# Update Claude Code
CLAUDE_CURRENT=$(claude --version 2>/dev/null | grep -oP '[\d.]+' | head -1 || echo "unknown")
sudo npm i -g @anthropic-ai/claude-code@latest >/dev/null 2>&1 || true
CLAUDE_NEW=$(claude --version 2>/dev/null | grep -oP '[\d.]+' | head -1 || echo "unknown")
if [ "$CLAUDE_CURRENT" != "$CLAUDE_NEW" ]; then
echo "[$(date)] Claude Code updated: $CLAUDE_CURRENT$CLAUDE_NEW"
fi