Skip to content

Instantly share code, notes, and snippets.

@hoosteeno
Created May 23, 2014 19:40
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/c7c92faee645fa2e4ba0 to your computer and use it in GitHub Desktop.
Save hoosteeno/c7c92faee645fa2e4ba0 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 \
-type d -name .svn -prune -o \
-type d -name access -prune -o \
-type d -name images -prune -o \
-type d -name includes -prune -o \
-type d -name script -prune -o \
-type d -wholename '*security/announce' -prune -o \
-type d -wholename '*security/known-vulnerabilities' -prune -o \
-type d -name style -prune -o \
-type d -name thunderbird -prune -o \
-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