Files
KNEL-AIMiddleware/CleanVendor.sh
Charles N Wyble 3c2ee58ca1 chore: Add setup scripts and Makefile for project management
Scripts added:
- CloneVendorRepos.sh: Clones all 27 vendor MCP/LSP repositories
- BuildAll.sh: Builds all services from docker-compose.yml
- CleanVendor.sh: Removes all cloned vendor repositories
- StatusCheck.sh: Checks build status of all services

Makefile added:
- Provides convenient targets for common operations
- Integrates all shell scripts into make commands
- Targets: help, clone-vendors, build-all, clean-vendor, status, test, logs, ps, up, down

Note: vendor/ directory remains gitignored (per .gitignore). CloneVendorRepos.sh creates it automatically.
2026-01-21 19:39:10 -05:00

50 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# CleanVendor.sh
# Script to remove all cloned vendor repositories
set -e # Exit on error
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo -e "${YELLOW}=== KNEL-AIMiddleware Vendor Cleanup Script ===${NC}"
echo ""
echo -e "${RED}WARNING: This will DELETE all cloned vendor repositories!${NC}"
echo ""
read -p "Are you sure you want to continue? (yes/no): " CONFIRM
if [ "$CONFIRM" != "yes" ]; then
echo "Aborted."
exit 0
fi
# Vendor directory
VENDOR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/vendor"
echo ""
echo "Removing vendor directories..."
echo ""
# Count removed
COUNT=0
# Remove all directories in vendor/ except .gitkeep
for DIR in "$VENDOR_DIR"/*; do
if [ -d "$DIR" ]; then
DIRNAME=$(basename "$DIR")
echo -e "${RED}[DELETE]${NC} $DIRNAME"
rm -rf "$DIR"
((COUNT++))
fi
done
echo ""
echo -e "${GREEN}=== Cleanup complete! Removed $COUNT directories ===${NC}"
echo ""
echo "To re-clone repositories, run:"
echo " ./CloneVendorRepos.sh"