Created
September 16, 2011 01:56
-
-
Save turadg/1221003 to your computer and use it in GitHub Desktop.
Rsync to CMU Andrew publishing and push to publish
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
RewriteEngine on | |
# match any directory | |
RewriteCond %{REQUEST_FILENAME} -d | |
# redirect somewhere instead of serving it | |
RewriteRule ^(.*)$ http://www.cs.cmu.edu/~taleahma/ [R,NC,L] |
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/sh | |
# Change these to where your local copy of www sits and your username | |
SOURCE=~/andrew-www | |
ANDREW_ID=`whoami` | |
# Andrew supports Rsync, who knew? | |
rsync -rv -e ssh $SOURCE $ANDREW_ID@unix.andrew.cmu.edu:www | |
# tell Andrew's weird publishing system to actually serve the contents of your www directory | |
curl "https://www.andrew.cmu.edu/cgi-bin/publish?FLAG=0&NAME=$ANDREW_ID" | |
echo "Check it out at http://www.andrew.cmu.edu/~$ANDREW_ID/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based off script by Nathan VanHoudnos at http://nathanvan.wordpress.com/2010/06/04/cmu-web-publishing-is-strange/