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.
This commit is contained in:
49
CleanVendor.sh
Executable file
49
CleanVendor.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user