Skip to content

Instantly share code, notes, and snippets.

@fnordfish
Created June 28, 2010 10:25
Show Gist options
  • Save fnordfish/455680 to your computer and use it in GitHub Desktop.
Save fnordfish/455680 to your computer and use it in GitHub Desktop.
Simple Bash-Script to recursive search a svn working copy for directories using externals
#/bin/bash
# This script searches a SVN working copy for all directories having externals
start_dir=.
if [ $1 ]; then
start_dir=$1
fi
for f in $( find $start_dir -type d | grep -v .svn )
do
svn pl $f 2>/dev/null | grep "svn:externals" > /dev/null 2>&1
if [ "$?" -eq "0" ]
then
echo -e "$f"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment