Last active
December 25, 2015 07:19
-
-
Save hoosteeno/6938196 to your computer and use it in GitHub Desktop.
Bash script for outputting a CSV with information about the contents of the mozilla.com SVN tree.
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 | |
# depends on an up-to-date local copy of the mozilla.com svn tree!! | |
#cd ~/mozilla/mozilla.com; svn update; cd ~/mozilla/legacy | |
echo "LOCATION, SVN, # FILES, BUG, NEXT STEPS" | |
for FILE in `find ~/mozilla/mozilla.com/en-US \ | |
-type d -name .svn -prune -o \ | |
-type f -name *.html -print -o \ | |
-type d -print` | |
do | |
SVN=`echo $FILE | perl -pe 's|^.*?com|http://viewvc.svn.mozilla.org/vc/projects/mozilla.com/trunk|'` | |
LOC=`echo $FILE | perl -pe 's|^.*?com|http://www.mozilla.com|'` | |
if [ -d $FILE ] | |
then | |
DIR=$FILE/ | |
COUNT=`find $DIR -mindepth 1 -print | wc -l` | |
else | |
COUNT='' | |
LOC=" $LOC" | |
fi | |
#RESP=`http --headers $LOC | head -1` | |
#RESP='' | |
echo "$LOC, $SVN, $COUNT" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment