summaryrefslogtreecommitdiffstats
path: root/tools/snapshot
diff options
context:
space:
mode:
Diffstat (limited to 'tools/snapshot')
0 files changed, 0 insertions, 0 deletions
diff --git a/tools/sfsnapshot b/tools/sfsnapshot
index efc5f01..3b71219 100755
--- a/tools/sfsnapshot
+++ b/tools/sfsnapshot
@@ -61,7 +61,7 @@ COMPILE_DIR=/tmp/tonvoon/tmp_snapshot
61IN=${HOME}/tmp_snapshot 61IN=${HOME}/tmp_snapshot
62 62
63# Where to place the generated files 63# Where to place the generated files
64OUT_SERVER="tonvoon@shell.sf.net" 64OUT_SERVER="tonvoon@web.sourceforge.net"
65OUT="/home/groups/n/na/nagiosplug/htdocs/snapshot" 65OUT="/home/groups/n/na/nagiosplug/htdocs/snapshot"
66 66
67# Make sure prereqs are satisfied on server! 67# Make sure prereqs are satisfied on server!
@@ -77,20 +77,8 @@ for i in $* ; do
77 make_dist $i 77 make_dist $i
78done 78done
79 79
80# Check for *.gz files locally (expect NFS between cf shell server and $CF)
81set -x
82files=$(ls $IN/*.gz 2>/dev/null)
83[[ -z $files ]] && die "No files created"
84head_file=$(cd $IN && ls *-trunk-*.gz 2>/dev/null)
85ssh -2 $OUT_SERVER "rm -f $OUT/*.gz"
86scp -2 $files $OUT_SERVER:$OUT
87if [[ -n $head_file ]] ; then
88 ssh -2 $OUT_SERVER "cd $OUT && ln -s $head_file nagios-plugins-HEAD.tar.gz"
89fi
90
91# Create MD5 sum 80# Create MD5 sum
92ssh -2 $OUT_SERVER << EOF 81cd $IN
93cd $OUT
94cat <<-END_README > README 82cat <<-END_README > README
95This is the daily SVN snapshot of nagiosplug, consisting of the SVN trunk 83This is the daily SVN snapshot of nagiosplug, consisting of the SVN trunk
96and any other branches. 84and any other branches.
@@ -101,9 +89,28 @@ The nagios-plugins-HEAD.tar.gz link will always go to the latest trunk snapshot
101The MD5SUM is: 89The MD5SUM is:
102END_README 90END_README
103md5sum *.gz | tee -a README > MD5SUM 91md5sum *.gz | tee -a README > MD5SUM
92
93
94# Check for *.gz files locally (expect NFS between cf shell server and $CF)
95set -x
96cd $IN
97files=$(ls *.gz 2>/dev/null)
98[[ -z $files ]] && die "No files created"
99head_file=$(cd $IN && ls -rt *-trunk-*.gz | head -1 2>/dev/null)
100cat <<-EOF > /tmp/batchfile.$$
101cd $OUT
102rm *.gz
103put *.gz
104ln $head_file nagios-plugins-HEAD.tar.gz
105put MD5SUM
106put README readme
104EOF 107EOF
105 108
106rm -f $files 109# Do the actual transfer
110# Have to put README down as readme because SF's apache server appears to block README files
111sftp -b /tmp/batchfile.$$ $OUT_SERVER
112
113rm -f $files /tmp/batchfile.$$
107 114
108# Work out success or failure 115# Work out success or failure
109expected=$(($# + 1)) 116expected=$(($# + 1))