Created
September 7, 2011 18:13
-
-
Save leikahing/1201293 to your computer and use it in GitHub Desktop.
super hack!
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 | |
# Hacky script to see what we have that's not in SVN, | |
# and what we don't have that's in SVN | |
listfile="dirlist.txt" | |
svnfile="svnlist.txt" | |
rm $listfile $svnfile | |
touch $listfile $svnfile | |
for direc in `gls -Ad -1 */`; do echo ${direc%/} >> $listfile; done | |
for proj in `svn list https://svnserver/svn/invent`; do echo ${proj%/} >> $svnfile; done | |
echo "Projects you don't have, and the commands to run them " | |
for missing in `comm -2 -3 $svnfile $listfile` | |
do | |
echo "git svn clone -s -r 80000:HEAD https://svnserver/svn/invent/${missing}" | |
done | |
echo "Projects you do have, but SVN doesn't" | |
for nonsvn in `comm -1 -3 $svnfile $listfile` | |
do | |
echo $nonsvn | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment