From: <jt...@us...> - 2007-04-21 11:34:25
|
Revision: 249 http://ro-oslib.svn.sourceforge.net/ro-oslib/?rev=249&view=rev Author: jtytgat Date: 2007-04-21 04:34:22 -0700 (Sat, 21 Apr 2007) Log Message: ----------- - Slightly better syntax reporting. - Enforce file/directory permissions on the website working copy and make rsync to take those into account as well. - Check there is at least an index.html in the website directory (extra sanity check). Modified Paths: -------------- trunk/upload-website Modified: trunk/upload-website =================================================================== --- trunk/upload-website 2007-04-15 22:35:27 UTC (rev 248) +++ trunk/upload-website 2007-04-21 11:34:22 UTC (rev 249) @@ -1,12 +1,12 @@ #!/bin/bash # Uploads the OSLib website based on the local SVN repository contents. # Written by John Tytgat -# Syntax: update-website <sf.net username> +# Syntax: update-website <sourceforge.net username> set -e if [ "x"$1 == "x" ] ; then - echo "Syntax: update-website <sf.net username>" + echo "Syntax: update-website <sourceforge.net username>" exit 1 fi @@ -16,20 +16,30 @@ # Small sanity check verifying if we can find the root of the OSLib website as # directory. if [ ! -d "$WEBSITE_SRC" ] ; then - echo "Failed to find the OSLib website contents at $WEBSITE_SRC" + echo "Failed to find the OSLib website contents at $WEBSITE_SRC." exit 1 fi +if [ ! -f "$WEBSITE_SRC/index.html" ] ; then + echo "Website at $WEBSITE_SRC does not have an index.html file." + exit 1 +fi # Check if the local SVN repository of the website does not contain local modifications # which haven't been commited yet. SVNCHANGES="`svn status --non-interactive $WEBSITE_SRC 2>&1`" if [ ! -z "$SVNCHANGES" ] ; then - echo "Local SVN directory $WEBSITE_SRC is not clean. Please clean it and/or commit first." + echo "Local SVN directory $WEBSITE_SRC is not clean. Please clean it and/or commit changes first." echo $SVNCHANGES exit 1 fi +# Enforce the correct file/directory permissions as these are rsync'ed as well (allowing +# the other OSLib developers to upload/change the website contents without permission +# problems): +find "$WEBSITE_SRC" -type d -exec chmod 2775 "{}" \; +find "$WEBSITE_SRC" -type f -exec chmod 664 "{}" \; + # Sync it: -rsync -zr --delete --force --progress -C --rsh="ssh -l $USERNAME" $WEBSITE_SRC/ $USE...@sh...:/home/groups/r/ro/ro-oslib/htdocs +rsync -zrp --delete --force --progress -C --rsh="ssh -l $USERNAME" $WEBSITE_SRC/ $USE...@sh...:/home/groups/r/ro/ro-oslib/htdocs echo "Done." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |