current - with may->june scripter debut
This commit is contained in:
49
scripts/shift-dates-june.sh
Normal file
49
scripts/shift-dates-june.sh
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
# Shift Scripter launch dates forward by one month
|
||||
# May N → June N, then April N → May N (order matters to avoid double-shift)
|
||||
# Also renames relevant directories and files
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "=== Shifting Scripter dates forward by one month ==="
|
||||
|
||||
# 1. Content replacement in files.
|
||||
# Order: May→June FIRST, then April→May.
|
||||
# This avoids double-shifting (Apr→May→Jun).
|
||||
find . -type f \( -name "*.md" -o -name "*.yaml" -o -name "*.yml" \) \
|
||||
-not -path "./.git/*" \
|
||||
-exec sed -i \
|
||||
-e 's/\bMay \([0-9]\+\)/June \1/g' \
|
||||
-e 's/\bApril \([0-9]\+\)/May \1/g' \
|
||||
{} +
|
||||
|
||||
echo " ✅ Updated month references in .md / .yaml / .yml files"
|
||||
|
||||
# 2. Rename the product-hunt-launch directory
|
||||
OLD_DIR="agents/cmo/life/projects/product-hunt-launch-may-2026"
|
||||
NEW_DIR="agents/cmo/life/projects/product-hunt-launch-june-2026"
|
||||
if [ -d "$OLD_DIR" ]; then
|
||||
find . -type f \( -name "*.md" -o -name "*.yaml" -o -name "*.yml" \) \
|
||||
-not -path "./.git/*" \
|
||||
-exec sed -i "s|$OLD_DIR|$NEW_DIR|g" {} +
|
||||
mv "$OLD_DIR" "$NEW_DIR"
|
||||
echo " ✅ Renamed $OLD_DIR → $NEW_DIR"
|
||||
fi
|
||||
|
||||
# 3. Rename memory files dated 2026-05-* → 2026-06-*
|
||||
# (and update cross-references to those filenames)
|
||||
find . -type f -name "2026-05-*.md" \
|
||||
-not -path "./.git/*" \
|
||||
| while read -r f; do
|
||||
newname=$(echo "$f" | sed 's|2026-05-|2026-06-|')
|
||||
oldbase=$(basename "$f")
|
||||
newbase=$(basename "$newname")
|
||||
find . -type f \( -name "*.md" -o -name "*.yaml" -o -name "*.yml" \) \
|
||||
-not -path "./.git/*" \
|
||||
-exec sed -i "s|$oldbase|$newbase|g" {} +
|
||||
mv "$f" "$newname"
|
||||
echo " ✅ Renamed $f → $newname"
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== Done! Dates shifted forward by one month ==="
|
||||
Reference in New Issue
Block a user