Files
scripts/migration/migrate-readme.sh
2026-02-09 21:51:52 -08:00

58 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Load shared libraries
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../lib/init.sh"
# Script to update project READMEs using standardized template
set -e
TEMPLATE=".github/README_TEMPLATE.md"
GUIDE="docs/README_UPDATE_GUIDE.md"
echo "📝 Updating project READMEs using standardized template..."
# Check if template exists
if [ ! -f "$TEMPLATE" ]; then
echo "❌ Template not found: $TEMPLATE"
exit 1
fi
# List of projects to update (excluding monorepos and special directories)
PROJECTS=(
"dbis_core"
"the_order"
"smom-dbis-138"
"Sankofa"
"loc_az_hci"
"Datacenter-Control-Complete"
"miracles_in_motion"
"metaverseDubai"
"quorum-test-network"
)
for project in "${PROJECTS[@]}"; do
if [ -d "$project" ]; then
readme_path="$project/README.md"
if [ -f "$readme_path" ]; then
echo "📄 Found README: $readme_path"
echo " → Review and update manually using template: $TEMPLATE"
echo " → Follow guide: $GUIDE"
else
echo "⚠️ Missing README: $readme_path"
echo " → Create using template: $TEMPLATE"
fi
else
echo "⚠️ Project not found: $project"
fi
done
echo ""
echo "✅ README update check complete!"
echo " → Use template: $TEMPLATE"
echo " → Follow guide: $GUIDE"
echo " → Update projects manually for best results"