Files
KNEL-AIMiddleware/scripts/CleanVendor.sh
Charles N Wyble 7c583e2821 refactor: organize scripts into scripts/ directory
Move utility scripts to dedicated scripts/ directory for better project
organization:
- BuildAll.sh
- CleanVendor.sh
- CloneVendorRepos.sh
- StatusCheck.sh
- validate-mcp.sh

Remove temporary build-nextcloud-mcp.sh as nextcloud-mcp is now built.
2026-01-22 18:02:56 -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"