Created
November 1, 2011 23:39
-
-
Save derekgreer/1332287 to your computer and use it in GitHub Desktop.
Bash script to find dead projects
This file contains 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 | |
declare -a SOLUTIONS=$(find . -name "*.sln") | |
declare -a PROJECTS=$(find . -name "*.csproj") | |
for PROJECT in ${PROJECTS[*]} | |
do | |
PROJECT_NAME=$(basename $PROJECT) | |
USED=0 | |
for SOLUTION in ${SOLUTIONS[*]} | |
do | |
if( grep $PROJECT_NAME $SOLUTION > 0 ) | |
then | |
USED=1 | |
fi | |
done | |
if(( $USED == 0 )) | |
then | |
echo "$PROJECT_NAME" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment