← back to Designer Wallcoverings
DW-Agents/dw-agents/final-cleanup.sh
32 lines
#!/bin/bash
echo "Final cleanup of SSO_TOKEN references..."
echo "========================================"
# Remove any remaining SSO_TOKEN references
for file in /root/DW-Agents/*-agent.ts; do
if grep -q "SSO_TOKEN" "$file"; then
echo "Cleaning $file..."
# Remove lines with SSO_TOKEN
sed -i '/SSO_TOKEN/d' "$file"
fi
done
# Fix marketing-agent and needs-attention-agent imports
echo ""
echo "Fixing missing imports..."
# marketing-agent.ts
if ! grep -q "import { requireGlobalAuth }" /root/DW-Agents/marketing-agent.ts; then
echo "Adding import to marketing-agent.ts"
sed -i '1a import { requireGlobalAuth } from '\''./shared-global-auth'\'';' /root/DW-Agents/marketing-agent.ts
fi
# needs-attention-agent.ts
if ! grep -q "import { requireGlobalAuth }" /root/DW-Agents/needs-attention-agent.ts; then
echo "Adding import to needs-attention-agent.ts"
sed -i '1a import { requireGlobalAuth } from '\''./shared-global-auth'\'';' /root/DW-Agents/needs-attention-agent.ts
fi
echo ""
echo "Cleanup complete!"