Created
May 23, 2014 19:40
-
-
Save hoosteeno/c7c92faee645fa2e4ba0 to your computer and use it in GitHub Desktop.
get some html files from mozilla.org SVN
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 | |
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