diff options
Diffstat (limited to 'tools/sfsnapshot')
-rwxr-xr-x | tools/sfsnapshot | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/sfsnapshot b/tools/sfsnapshot index c9c56bd6..1a8a02fe 100755 --- a/tools/sfsnapshot +++ b/tools/sfsnapshot | |||
@@ -80,15 +80,22 @@ done | |||
80 | set -x | 80 | set -x |
81 | files=$(ls $IN/*.gz 2>/dev/null) | 81 | files=$(ls $IN/*.gz 2>/dev/null) |
82 | [[ -z $files ]] && die "No files created" | 82 | [[ -z $files ]] && die "No files created" |
83 | head_file=$(cd $IN && ls *HEAD*.gz 2>/dev/null) | ||
83 | ssh -2 $OUT_SERVER "rm -f $OUT/*.gz" | 84 | ssh -2 $OUT_SERVER "rm -f $OUT/*.gz" |
84 | scp -2 $files $OUT_SERVER:$OUT | 85 | scp -2 $files $OUT_SERVER:$OUT |
86 | if [[ -n $head_file ]] ; then | ||
87 | ssh -2 $OUT_SERVER "cd $OUT && ln -s $head_file nagios-plugins-HEAD.tar.gz" | ||
88 | fi | ||
85 | 89 | ||
86 | # Create MD5 sum | 90 | # Create MD5 sum |
87 | ssh -2 $OUT_SERVER << EOF | 91 | ssh -2 $OUT_SERVER << EOF |
88 | cd $OUT | 92 | cd $OUT |
89 | cat <<-END_README > README | 93 | cat <<-END_README > README |
90 | This is the daily CVS snapshot of nagiosplug, consisting of the CVS HEAD | 94 | This is the daily CVS snapshot of nagiosplug, consisting of the CVS HEAD |
91 | and any other branches | 95 | and any other branches. |
96 | |||
97 | The nagios-plugins-HEAD.tar.gz link will always go to the latest HEAD snapshot. | ||
98 | |||
92 | The MD5SUM is: | 99 | The MD5SUM is: |
93 | END_README | 100 | END_README |
94 | md5sum *.gz | tee -a README > MD5SUM | 101 | md5sum *.gz | tee -a README > MD5SUM |