diff options
-rwxr-xr-x | tools/sfsnapshot | 28 | ||||
-rwxr-xr-x | tools/sfwebcron | 20 |
2 files changed, 28 insertions, 20 deletions
diff --git a/tools/sfsnapshot b/tools/sfsnapshot index 46f34a3..efc5f01 100755 --- a/tools/sfsnapshot +++ b/tools/sfsnapshot | |||
@@ -12,26 +12,27 @@ | |||
12 | 12 | ||
13 | function die { echo $1; exit 1; } | 13 | function die { echo $1; exit 1; } |
14 | 14 | ||
15 | # This makes the distribution. Expects $1 as CVS tag, otherwise uses HEAD | 15 | # This makes the distribution. Expects $1 as branches/name, otherwise uses trunk |
16 | function make_dist { | 16 | function make_dist { |
17 | if [[ -n $1 ]] ; then | 17 | if [[ -n $1 ]] ; then |
18 | cvs_rel=$1 | 18 | svn_url_suffix=$1 |
19 | v="$1-" | 19 | name=${1##*/} |
20 | else | 20 | else |
21 | cvs_rel="HEAD" | 21 | svn_url_suffix="trunk" |
22 | v="HEAD-" | 22 | name="trunk" |
23 | fi | 23 | fi |
24 | v="$name-" | ||
24 | 25 | ||
25 | # Get compile server to do the work | 26 | # Get compile server to do the work |
26 | # Variables will be expanded locally before being run on $CF | 27 | # Variables will be expanded locally before being run on $CF |
27 | ssh $CF <<EOF | 28 | ssh $CF <<EOF |
28 | set -x | 29 | set -x |
29 | PATH=$PATH:/usr/local/bin | 30 | PATH=$PATH:/usr/local/bin |
30 | [[ ! -d $COMPILE_DIR/$cvs_rel ]] && mkdir -p $COMPILE_DIR/$cvs_rel | 31 | [[ ! -d $COMPILE_DIR/$name ]] && mkdir -p $COMPILE_DIR/$name |
31 | cd $COMPILE_DIR/$cvs_rel | 32 | cd $COMPILE_DIR/$name |
32 | 33 | ||
33 | # Cannot use cvs export due to conflicts on second run - think this is better for cvs server | 34 | # Cannot use cvs export due to conflicts on second run - think this is better for cvs server |
34 | CVS_RSH=ssh cvs -z3 -d:ext:tonvoon@nagiosplug.cvs.sourceforge.net:/cvsroot/nagiosplug co -r $cvs_rel nagiosplug | 35 | svn export https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/$svn_url_suffix $PROJECT |
35 | 36 | ||
36 | cd $PROJECT | 37 | cd $PROJECT |
37 | 38 | ||
@@ -60,11 +61,11 @@ COMPILE_DIR=/tmp/tonvoon/tmp_snapshot | |||
60 | IN=${HOME}/tmp_snapshot | 61 | IN=${HOME}/tmp_snapshot |
61 | 62 | ||
62 | # Where to place the generated files | 63 | # Where to place the generated files |
63 | OUT_SERVER="shell.sf.net" | 64 | OUT_SERVER="tonvoon@shell.sf.net" |
64 | OUT="/home/groups/n/na/nagiosplug/htdocs/snapshot" | 65 | OUT="/home/groups/n/na/nagiosplug/htdocs/snapshot" |
65 | 66 | ||
66 | # Make sure prereqs are satisfied on server! | 67 | # Make sure prereqs are satisfied on server! |
67 | CF="x86-linux2" | 68 | CF="localhost" |
68 | DS=`date -u +%Y%m%d%H%M` | 69 | DS=`date -u +%Y%m%d%H%M` |
69 | 70 | ||
70 | # Setup home directory area | 71 | # Setup home directory area |
@@ -80,7 +81,7 @@ done | |||
80 | set -x | 81 | set -x |
81 | files=$(ls $IN/*.gz 2>/dev/null) | 82 | files=$(ls $IN/*.gz 2>/dev/null) |
82 | [[ -z $files ]] && die "No files created" | 83 | [[ -z $files ]] && die "No files created" |
83 | head_file=$(cd $IN && ls *HEAD*.gz 2>/dev/null) | 84 | head_file=$(cd $IN && ls *-trunk-*.gz 2>/dev/null) |
84 | ssh -2 $OUT_SERVER "rm -f $OUT/*.gz" | 85 | ssh -2 $OUT_SERVER "rm -f $OUT/*.gz" |
85 | scp -2 $files $OUT_SERVER:$OUT | 86 | scp -2 $files $OUT_SERVER:$OUT |
86 | if [[ -n $head_file ]] ; then | 87 | if [[ -n $head_file ]] ; then |
@@ -91,10 +92,11 @@ fi | |||
91 | ssh -2 $OUT_SERVER << EOF | 92 | ssh -2 $OUT_SERVER << EOF |
92 | cd $OUT | 93 | cd $OUT |
93 | cat <<-END_README > README | 94 | cat <<-END_README > README |
94 | This is the daily CVS snapshot of nagiosplug, consisting of the CVS HEAD | 95 | This is the daily SVN snapshot of nagiosplug, consisting of the SVN trunk |
95 | and any other branches. | 96 | and any other branches. |
96 | 97 | ||
97 | The nagios-plugins-HEAD.tar.gz link will always go to the latest HEAD snapshot. | 98 | The nagios-plugins-HEAD.tar.gz link will always go to the latest trunk snapshot |
99 | (name kept for existing tinderbox scripts to link correctly). | ||
98 | 100 | ||
99 | The MD5SUM is: | 101 | The MD5SUM is: |
100 | END_README | 102 | END_README |
diff --git a/tools/sfwebcron b/tools/sfwebcron index 9824de8..d836a0f 100755 --- a/tools/sfwebcron +++ b/tools/sfwebcron | |||
@@ -11,19 +11,25 @@ function die { echo $1; exit 1; } | |||
11 | # Set working variables | 11 | # Set working variables |
12 | PROJECT=nagiosplug | 12 | PROJECT=nagiosplug |
13 | IN=${HOME}/tmp_sfwebcron | 13 | IN=${HOME}/tmp_sfwebcron |
14 | OUT_SERVER="tonvoon@shell.sf.net" | ||
14 | OUT="/home/groups/n/na/nagiosplug/htdocs" | 15 | OUT="/home/groups/n/na/nagiosplug/htdocs" |
15 | 16 | ||
17 | if [[ ! -e developer-guidelines.html.last ]] ; then | ||
18 | touch developer-guidelines.html.last | ||
19 | fi | ||
20 | |||
16 | # Get latest dev guildelines | 21 | # Get latest dev guildelines |
17 | [[ ! -d $IN ]] && mkdir $IN | 22 | [[ ! -d $IN ]] && mkdir $IN |
18 | cd $IN | 23 | cd $IN |
19 | if [[ ! -d $PROJECT ]] ; then | 24 | if [[ ! -d doc ]] ; then |
20 | cvs -z3 -d:pserver:anonymous@cvs1:/cvsroot/nagiosplug co nagiosplug || die "Cannot cvs" | 25 | #cvs -z3 -d:pserver:anonymous@cvs1:/cvsroot/nagiosplug co nagiosplug || die "Cannot cvs" |
26 | svn checkout http://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk/doc doc | ||
21 | fi | 27 | fi |
22 | cd nagiosplug/doc | 28 | cd doc |
23 | cvs update | 29 | svn update |
24 | 30 | ||
25 | # Is the dev guidelines updated? | ||
26 | make | 31 | make |
27 | if [[ developer-guidelines.html -nt $OUT/developer-guidelines.html ]] ; then | 32 | if [[ developer-guidelines.html -nt developer-guidelines.html.last ]] ; then |
28 | cp developer-guidelines.html developer-guidelines.sgml $OUT | 33 | scp developer-guidelines.{html,sgml} $OUT_SERVER:$OUT |
34 | touch developer-guidelines.html.last | ||
29 | fi | 35 | fi |