Last active
          November 8, 2024 16:23 
        
      - 
      
 - 
        
Save designfrontier/b31baf5c9011d3a250f6d875197939ea to your computer and use it in GitHub Desktop.  
    archive and clean
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #! /bin/bash | |
| mv $1 ~/projects/Archive | |
| # Loop over each first-level subdirectory | |
| for dir in ~/projects/Archive/*/; do | |
| # Check if 'node_modules' exists within the subdirectory | |
| if [ -d "${dir}node_modules" ]; then | |
| echo "Deleting ${dir}node_modules" | |
| rm -rf "${dir}node_modules" | |
| fi | |
| done | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment