Remove unused tools.
authorMattias Holmlund <mattias@sol.holmlund.se>
Thu, 13 Dec 2007 19:34:10 +0000 (20:34 +0100)
committerMattias Holmlund <mattias@sol.holmlund.se>
Thu, 13 Dec 2007 19:34:10 +0000 (20:34 +0100)
tools/mh-xmltv-runtests [deleted file]
tools/mh-xmltv-updatestate [deleted file]

diff --git a/tools/mh-xmltv-runtests b/tools/mh-xmltv-runtests
deleted file mode 100755 (executable)
index d88ab09..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/bash
-
-function clean_output {
-  mv $1/t_summary.log $1/x_summary.last 2>/dev/null
-  rm -f $1/t_* $1/build.log $1/test_grabbers.*
-  date > $1/build.log
-}
-
-function clean_src {
-  cd $1
-  make clean >> $2/build.log 2>&1
-}
-
-function cvs_up {
-  cd $1
-  cvs -q update -d -P >> $2/build.log || echo "cvs update failed"
-  cvs2cl -g "-q" -l "-d >7 days ago" >> $2/build.log || echo "cvs2cl failed"
-}
-
-function run_tests {
-  R=$1
-  O=$2
-  T=$3
-  cp $R/ChangeLog $O/
-  perl Makefile.PL --yes >> $O/build.log 2>&1
-  make >> $O/build.log 2>&1
-
-  cd $O
-  $R/grab/test_grabbers > $O/test_grabbers.log
-  diff x_summary.last t_summary.log | grep ">"
-  /home/mattias/bin/testlog2html $T $O < $O/test_grabbers.log 
-  /home/mattias/bin/mh-xmltv-updatestate $O.state $O/test_grabbers.dump
-}
-
-function prepare_upload {
-  rsync -c --delete -r $1/ $2/
-  rm $2/*.xml $2/*cache
-}
-
-function save_history {
-  rm -r $2/9
-  mv $2/8 $2/9
-  mv $2/7 $2/8
-  mv $2/6 $2/7
-  mv $2/5 $2/6
-  mv $2/4 $2/5
-  mv $2/3 $2/4
-  mv $2/2 $2/3
-  mv $2/1 $2/2
-  mv $2/0 $2/1
-  mkdir $2/0
-  cp $1/* $2/0/
-}
-
-OUTPUT=/home/mattias/nobackup/xmltv-nightly-result
-HISTORY=/home/mattias/nobackup/xmltv-nightly-result-history
-SRC=/home/mattias/nobackup/xmltv-nightly
-UPLOAD=/home/mattias/nobackup/xmltv-nightly-upload
-clean_output $OUTPUT
-clean_src $SRC $OUTPUT
-cvs_up $SRC $OUTPUT
-run_tests $SRC $OUTPUT Nightly
-prepare_upload $OUTPUT $UPLOAD
-save_history $UPLOAD $HISTORY
-
-OUTPUT=/home/mattias/nobackup/xmltv-release-result
-HISTORY=/home/mattias/nobackup/xmltv-release-result-history
-SRC=/home/mattias/nobackup/xmltv-0.5.45
-UPLOAD=/home/mattias/nobackup/xmltv-release-upload
-clean_output $OUTPUT
-run_tests $SRC $OUTPUT 0.5.45
-prepare_upload $OUTPUT $UPLOAD
-save_history $UPLOAD $HISTORY
-
-# Sometimes one or more files fail. It doesn't hurt to update twice.
-#sitecopy -qq --update www2-xmltv-nightly
-#sitecopy -qq --update www2-xmltv-nightly
-#sitecopy -qq --update www2-xmltv-release
-#sitecopy -qq --update www2-xmltv-release
-
-rsync -az --delete ~/nobackup/xmltv-nightly-upload/* upload.www2.holmlund.se:public_html/www2/xmltv-nightly/
-rsync -avz --delete ~/nobackup/xmltv-release-upload/* upload.www2.holmlund.se:public_html/www2/xmltv-release/
diff --git a/tools/mh-xmltv-updatestate b/tools/mh-xmltv-updatestate
deleted file mode 100755 (executable)
index ded4f04..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-
-use File::Slurp;
-use Data::Dumper;
-
-if( scalar( @ARGV ) != 2 ) {
-    print << "EOHELP";
-mh-xmltv-updatestate statefile lateststate
-
-Update <statefile> with the information in <lateststate>.
-
-EOHELP
-
-    exit 1;
-}
-
-my( $statefile, $lateststate ) = @ARGV;
-
-my $state;
-
-if( -e $statefile ) {
-    my $statedata = read_file( $statefile );
-    $state = eval $statedata;
-}
-
-my $latestdata = read_file( $lateststate );
-my $latest = eval $latestdata;
-
-foreach my $grabber (keys %{$latest}) {
-    next if $grabber eq "t";
-    if( not defined( $state->{$grabber} ) ) {
-       $state->{$grabber} = { 
-           last_ok => 0,
-           last_fail => 0,
-           last_fail_message => "",
-       }
-    }
-
-    if( $latest->{$grabber} eq "ok" ) {
-       $state->{$grabber}->{last_ok} = $latest->{t};
-    }
-    else {
-       $state->{$grabber}->{last_fail} = $latest->{t};
-       $state->{$grabber}->{last_fail_message} = $latest->{$grabber};
-    }
-}
-
-open( OUT, "> $statefile" ) or die "open failed";
-$Data::Dumper::Terse = 1;
-print OUT Dumper( $state );
-close( OUT );
-
-
-