SF.net SVN: nagiosplug:[2109] nagiosplug/trunk/tools/sfsnapshot
| Newsgroups | gmane.network.nagios.plugins.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 2109
http://nagiosplug.svn.sourceforge.net/nagiosplug/?rev=2109&view=rev
Author: dermoth
Date: 2008-12-02 17:26:17 +0000 (Tue, 02 Dec 2008)
Log Message:
-----------
Updated to latest due to SF policy changes
Modified Paths:
--------------
nagiosplug/trunk/tools/sfsnapshot
Modified: nagiosplug/trunk/tools/sfsnapshot
===================================================================
--- nagiosplug/trunk/tools/sfsnapshot 2008-12-02 17:04:27 UTC (rev 2108)
+++ nagiosplug/trunk/tools/sfsnapshot 2008-12-02 17:26:17 UTC (rev 2109)
@@ -61,7 +61,7 @@
IN=${HOME}/tmp_snapshot
# Where to place the generated files
-OUT_SERVER="[email protected]"
+OUT_SERVER="[email protected]"
OUT="/home/groups/n/na/nagiosplug/htdocs/snapshot"
# Make sure prereqs are satisfied on server!
@@ -77,20 +77,8 @@
make_dist $i
done
-# Check for *.gz files locally (expect NFS between cf shell server and $CF)
-set -x
-files=$(ls $IN/*.gz 2>/dev/null)
-[[ -z $files ]] && die "No files created"
-head_file=$(cd $IN && ls *-trunk-*.gz 2>/dev/null)
-ssh -2 $OUT_SERVER "rm -f $OUT/*.gz"
-scp -2 $files $OUT_SERVER:$OUT
-if [[ -n $head_file ]] ; then
- ssh -2 $OUT_SERVER "cd $OUT && ln -s $head_file nagios-plugins-HEAD.tar.gz"
-fi
-
# Create MD5 sum
-ssh -2 $OUT_SERVER << EOF
-cd $OUT
+cd $IN
cat <<-END_README > README
This is the daily SVN snapshot of nagiosplug, consisting of the SVN trunk
and any other branches.
@@ -101,10 +89,29 @@
The MD5SUM is:
END_README
md5sum *.gz | tee -a README > MD5SUM
+
+
+# Check for *.gz files locally (expect NFS between cf shell server and $CF)
+set -x
+cd $IN
+files=$(ls *.gz 2>/dev/null)
+[[ -z $files ]] && die "No files created"
+head_file=$(cd $IN && ls -rt *-trunk-*.gz | head -1 2>/dev/null)
+cat <<-EOF > /tmp/batchfile.$$
+cd $OUT
+rm *.gz
+put *.gz
+ln $head_file nagios-plugins-HEAD.tar.gz
+put MD5SUM
+put README readme
EOF
-rm -f $files
+# Do the actual transfer
+# Have to put README down as readme because SF's apache server appears to block README files
+sftp -b /tmp/batchfile.$$ $OUT_SERVER
+rm -f $files /tmp/batchfile.$$
+
# Work out success or failure
expected=$(($# + 1))
set -- $files
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/