Skip to content

Instantly share code, notes, and snippets.

@hoosteeno
Created May 23, 2014 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hoosteeno/a51086f4268cbf409720 to your computer and use it in GitHub Desktop.
Save hoosteeno/a51086f4268cbf409720 to your computer and use it in GitHub Desktop.
get some html files from mozilla.org SVN
#!/bin/bash
echo "LOCATION, SVN, # FILES"
for FILE in `find ~/mozilla/mozilla.com/org/access \
-type d -name .svn -prune -o \
-a -type f -name '*.html' -print`
do
SVN=`echo $FILE | perl -pe 's|^.*?org|http://viewvc.svn.mozilla.org/vc/projects/mozilla.org/trunk|'`
LOC=`echo $FILE | perl -pe 's|^.*?org|http://www.mozilla.org|'`
if [ -d $FILE ]
then
DIR=$FILE/
COUNT=`find $DIR -mindepth 1 -print | wc -l`
else
COUNT=''
LOC=" $LOC"
fi
echo "$LOC, $SVN, $COUNT"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment