Created
September 30, 2016 21:11
-
-
Save larsvilhuber/d2900f5fd513d186cde1864cbf9edc93 to your computer and use it in GitHub Desktop.
Mirroring of Stata packages from Repec
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 | |
SRCURL=http://fmwww.bc.edu/repec/bocode/ | |
if [[ -z $1 ]] | |
then | |
cat << EOF | |
$0 start | |
mirror $SRCURL to this directory | |
EOF | |
exit 0 | |
fi | |
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent $SRCURL | |
# clean up | |
rm fmwww.bc.edu/repec/repec.css | |
rm fmwww.bc.edu/ecstyle.css | |
find fmwww.bc.edu -name index.html\* -exec rm {} \; | |
# put a note | |
sed "s/XXDATEXX/$(date +%F)/" stata.toc > fmwww.bc.edu/repec/bocode/stata.toc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment