- 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>
15 lines
345 B
Bash
15 lines
345 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
LOGDIR=/home/alex/clawd/monitor
|
|
LOGFILE=${LOGDIR}/usage.log
|
|
MAXFILES=10
|
|
|
|
mkdir -p "$LOGDIR"
|
|
# rotate if > MAXFILES
|
|
if [ -f "$LOGFILE" ]; then
|
|
ts=$(date +%s)
|
|
mv "$LOGFILE" "${LOGFILE}.${ts}"
|
|
fi
|
|
# cleanup old files
|
|
ls -1t ${LOGDIR}/usage.log.* 2>/dev/null | sed -n "$((MAXFILES+1)),999p" | xargs -r rm -f
|