r287 - html/trunk/external-scripts

jhuntwork at linuxfromscratch.org jhuntwork at linuxfromscratch.org
Tue Jun 14 15:29:26 PDT 2005


Author: jhuntwork
Date: 2005-06-14 16:29:25 -0600 (Tue, 14 Jun 2005)
New Revision: 287

Modified:
   html/trunk/external-scripts/lfs-rsync.sh
Log:
Updated lfs rsync script

Modified: html/trunk/external-scripts/lfs-rsync.sh
===================================================================
--- html/trunk/external-scripts/lfs-rsync.sh	2005-06-14 20:09:14 UTC (rev 286)
+++ html/trunk/external-scripts/lfs-rsync.sh	2005-06-14 22:29:25 UTC (rev 287)
@@ -1,15 +1,12 @@
 #!/bin/bash
 
-HTMLDIR=/var/www/htdocs/lfssite
+SITE=linuxfromscratch.org
+MODULE=lfs-website
+LOCAL=/path/to/local/site	# Edit this line
+USER=admin@<your domain here>	# Edit this line
+MAILER=/usr/sbin/sendmail	# Edit this line, if necessary
 
-cd $HTMLDIR/timestamp
-oldstamp=$(cat timestamp)
+OUTPUT=`rsync -clprtzv --delete ${SITE}::${MODULE} ${LOCAL}`
 
-rsync -cr linuxfromscratch.org::lfs-timestamp .
-
-newstamp=$(cat timestamp)
-
-if [ $newstamp -gt $oldstamp ]; then
-	rsync -clprtz --delete linuxfromscratch.org::lfs-website $HTMLDIR
-fi
-
+# Run the command and mail the results
+(echo "Subject: LFS HTTP Mirror Updated - RC $?"; echo -e "${OUTPUT}") | ${MAILER} ${USER};




More information about the website mailing list