Skip to content

Instantly share code, notes, and snippets.

@turadg
Created September 16, 2011 01:56
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 turadg/1221003 to your computer and use it in GitHub Desktop.
Save turadg/1221003 to your computer and use it in GitHub Desktop.
Rsync to CMU Andrew publishing and push to publish
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]
#!/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/"
@turadg
Copy link
Author

turadg commented Sep 16, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment