Index: utils/tags/utils-00-00-32/version.cxx
===================================================================
--- utils/tags/utils-00-00-32/version.cxx	(revision 0)
+++ utils/tags/utils-00-00-32/version.cxx	(revision 1712)
@@ -0,0 +1,103 @@
+
+
+
+#include <cstdlib>
+
+#include <iostream>
+#include <string>
+#include <vector>
+
+
+
+
+class sstring : public std::string { 
+
+public: 
+
+  sstring( const char* s ) : std::string(s) { } 
+  sstring( const std::string& s ) : std::string(s) { } 
+
+  bool contains(const std::string& s) { return find(s)!=std::string::npos; }
+
+  std::string chop(const std::string& s) { 
+    size_t pos = find(s);
+    if (pos==std::string::npos ) { 
+      std::string front = *this;
+      erase(0, length());
+      return front;
+    }
+    std::string front = substr(0, pos);
+    erase(0, pos+1);
+    return front;
+  }
+
+
+
+};
+
+
+std::string EXECUTABLE;
+
+int usage(const std::string& s="", int i=-1) { 
+  std::cerr << "Usage: " << EXECUTABLE << " [-s|-t] VERSION" << std::endl;
+    if ( s.size() ) std::cerr << s << std::endl;
+    return i;
+}
+
+
+int main(int argc, char** argv) { 
+  
+  EXECUTABLE = argv[0]; 
+
+  if ( argc<3 ) return usage();
+
+  bool svn = (std::string(argv[1])=="-s");
+
+  if ( !svn ) if ( std::string(argv[1])!="-t" ) return usage( "incorrect format option", -1 );
+
+  sstring version = argv[2];
+
+
+  std::string spliton;
+
+  if      ( version.contains("-") ) spliton = "-";
+  else if ( version.contains(".") ) spliton = ".";
+  else  return usage( "string contains no version separators", -1 );
+
+
+  //  std::cout << version << std::endl;
+
+
+  std::vector<int> tags;
+
+  while ( version.size() ) { 
+    tags.push_back( std::atoi(version.chop(spliton).c_str()) );
+  }
+
+  if ( tags.size()!=3 ) return usage( "incorrect tag count ", -1 );
+
+
+  if ( std::string(argv[0])=="increment" ) tags[2]++;
+
+  if ( svn ) { 
+    
+    for ( int i=0 ; i<3 ; i++ ) { 
+      if      ( tags[i]>99 ) std::cout << "XX";
+      else if ( tags[i]<10 ) std::cout << "0" << tags[i];
+      else                   std::cout << tags[i];
+      if ( i<2 ) std::cout << "-";
+    }
+    std::cout << std::endl;
+
+  }
+  else { 
+    for ( int i=0 ; i<3 ; i++ ) { 
+      if      ( tags[i]>99 ) std::cout << "XX";
+      else                   std::cout << tags[i];
+      if ( i<2 ) std::cout << ".";
+    }
+    std::cout << std::endl;
+  }
+
+  return 0;
+}
Index: utils/tags/utils-00-00-32/prepare.sh
===================================================================
--- utils/tags/utils-00-00-32/prepare.sh	(revision 0)
+++ utils/tags/utils-00-00-32/prepare.sh	(revision 1712)
@@ -0,0 +1,158 @@
+#!/bin/csh 
+    
+
+set IN = $PWD
+
+set force = 0
+
+set mypackage = applgrid
+
+if ( $#argv > 0 ) then
+  if ( "$1" == "--help" ) then 
+      echo "Usage: prepare.sh [--help | --force]"
+      exit
+  endif 
+  if ( "$1" == "--force" ) then 
+      set force = 1
+      shift
+  endif
+  if ( "x$1" == "x--package" ) then 
+      shift
+      if ( $#argv > 0 ) then 
+         set mypackage = $1
+         shift
+      else
+         echo "not enough argments after --package"
+         exit
+      endif
+  endif
+endif
+
+
+
+if ( $#argv < 1 ) then 
+
+# set DIR = `sed -n "s_/trunk__p" .svn/entries`
+  set DIR = `svn info | grep URL | awk '{print $2}' | sed "s_/trunk.*__"`
+  if ( $status != 0 ) then 
+    echo "not a working svn repository" 
+    exit 1
+  endif  
+
+  set PACKAGE = ${DIR:t}
+  if ( -e version.dat ) then  
+     set VERSION = `cat version.dat`
+  else if ( -e configure.ac ) then 
+     set VERSION = `sed -n 's/AC_INIT.*,\(.*\),.*@.*/\1/p' configure.ac`
+  else 
+     echo "directory not versioned"
+     exit 1   
+  endif
+
+  set dir = $PACKAGE-$VERSION
+  set SVNVERSION = `version -s $VERSION`
+  set svndir = $DIR/tags/$PACKAGE-$SVNVERSION
+
+  echo "version: $SVNVERSION"
+
+else 
+
+  set PACKAGE = $1
+  set VERSION = ""
+
+  if ( $#argv > 1 ) then 
+      set VERSION    = `version -t $2`
+      set SVNVERSION = `version -s $2`
+  else 
+
+      cd /tmp
+
+      set BASE = $PWD
+
+      echo "checking out $PACKAGE"
+
+      svn export $SVNROOT/$PACKAGE/trunk $PACKAGE >& /dev/null 
+ 
+      if ( $status != 0 ) then 
+        echo "could not export $PACKAGE/trunk"
+        cd $IN
+        exit 1
+      endif
+      
+      if ( -e $PACKAGE/version.dat ) then  
+         set VERSION = `cat $PACKAGE/version.dat`
+      else if ( -e $PACKAGE/configure.ac ) then 
+         set VERSION = `sed -n 's/AC_INIT.*,\(.*\),.*@.*/\1/p' $PACKAGE/configure.ac`
+      else 
+         echo "directory not versioned" 
+         cd $IN
+         exit 1   
+      endif
+
+      set SVNVERSION = `version -s $VERSION`
+      mv $PACKAGE{,-$VERSION}
+      cd $BASE
+
+  endif    
+
+  set dir    = $PACKAGE-$VERSION
+  set svndir = $SVNROOT/$PACKAGE/tags/$PACKAGE-$SVNVERSION
+
+endif
+
+echo svndir $svndir
+
+
+echo "preparing tar archive for $PACKAGE version $VERSION" 
+
+
+set DATE = `date "+%Y-%m-%d:%H:%M:%S"`	
+set found = .found-$DATE
+ssh login.hepforge.org ls $mypackage/downloads/$dir.tgz >& $found
+set FOUND = `cat $found`
+rm $found
+
+if ( "$force" == 0 && "$FOUND" == "$mypackage/downloads/$dir.tgz" ) then 
+  echo "archive already exists"
+  cd $IN
+  exit 1
+endif
+
+
+
+cd /tmp
+
+set BASE = $PWD
+
+
+if ( -e $dir ) then 
+  mv $dir $dir-$DATE
+endif
+
+
+svn export $svndir $dir
+
+if ( $status != 0 ) then 
+    echo "svn tag does not exist"
+    cd $IN
+    exit 1
+endif
+
+
+
+    
+if !( -e $dir/version.dat ) then 
+    cd $dir
+    ./configure 
+    make dist
+    mv $dir.tar.gz $dir.tgz 
+else         
+    #    rm $dir/version.dat
+    tar -czf $dir.tgz  $dir 
+endif
+
+
+scp $dir.tgz login.hepforge.org:$mypackage/downloads
+    
+cd $IN
+

Property changes on: utils/tags/utils-00-00-32/prepare.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: utils/tags/utils-00-00-32/hoppet.sh
===================================================================
--- utils/tags/utils-00-00-32/hoppet.sh	(revision 0)
+++ utils/tags/utils-00-00-32/hoppet.sh	(revision 1712)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+if [ -e "hoppet-config" ]; then
+   if [ "$1" = "--cxxflags" ]; then
+      hoppet-config --cxxflags
+   elif [ "$1" = "--libs" ]; then
+      hoppet-config --libs
+   elif [ "$1" = "" ]; then
+      echo -DHOPPET
+   else
+      hoppet-config $1
+   fi
+fi
+
+

Property changes on: utils/tags/utils-00-00-32/hoppet.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: utils/tags/utils-00-00-32/rootarch.sh
===================================================================
--- utils/tags/utils-00-00-32/rootarch.sh	(revision 0)
+++ utils/tags/utils-00-00-32/rootarch.sh	(revision 1712)
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if [ -e $ROOTSYS/bin/root-config ]; then 
+   m64=`root-config --cflags | grep m64`
+   if [ "$m64" != "" ]; then 
+     echo "-m64"
+   else
+     echo "-m32"
+   fi
+fi 
+
+

Property changes on: utils/tags/utils-00-00-32/rootarch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: utils/tags/utils-00-00-32/gfortran.sh
===================================================================
--- utils/tags/utils-00-00-32/gfortran.sh	(revision 0)
+++ utils/tags/utils-00-00-32/gfortran.sh	(revision 1712)
@@ -0,0 +1,8 @@
+#!/bin/csh -f
+
+if ( $?ARCH ) then   
+  set gf = `gfortran $ARCH -print-file-name=libgfortran.a` 
+  echo "-L${gf:h} -lgfortran" 
+endif
+
+

Property changes on: utils/tags/utils-00-00-32/gfortran.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: utils/tags/utils-00-00-32/update.sh
===================================================================
--- utils/tags/utils-00-00-32/update.sh	(revision 0)
+++ utils/tags/utils-00-00-32/update.sh	(revision 1712)
@@ -0,0 +1,78 @@
+#!/bin/csh
+
+set IN = $PWD
+
+set COMMENT = ""
+
+while ( $#argv > 0 ) 
+  if ( "$1" == "-m" ) then
+    shift 
+    if ( $#argv > 0 ) then 
+      set COMMENT = "$1"
+    else
+      echo "no version comment" 
+      exit 1
+    endif
+  endif
+  shift
+end
+
+if ( "$COMMENT" == "" ) then 
+   echo "no version comment" 
+   exit 1
+endif
+
+
+
+if ( -e version.dat ) then 
+    set VERSION = `cat version.dat`
+    echo old version $VERSION
+    set NEWVERSION    = `increment -t $VERSION`
+    set NEWSVNVERSION = `increment -s $VERSION`
+    echo new version $NEWVERSION
+    echo $NEWVERSION > version.dat
+else 
+  if ( -e configure.ac ) then 
+    set VERSION = `grep AC_INIT configure.ac | sed 's/.*,\(.*\),.*@.*/\1/'`
+    echo old version $VERSION
+    set NEWVERSION    = `increment -t $VERSION`
+    set NEWSVNVERSION = `increment -s $VERSION`
+    echo new version $NEWVERSION
+    cp    configure.ac{,-}
+    cat   configure.ac- | sed "s/$VERSION/$NEWVERSION/" > configure.ac
+    diff  configure.ac{,-}
+    autoreconf --force
+    if ( $status != 0 ) then 
+      echo "autoreconf failed"
+      cd $IN
+      exit
+    endif
+  else
+    echo "no version information"
+    cd $IN
+    exit
+  endif
+endif
+    
+if ( -e README ) then 
+   cp   README{,-}
+   cat  README-   | sed "s/$VERSION/$NEWVERSION/" > README
+endif
+
+
+
+# now commit the version with the new version number
+
+svn commit -m "$COMMENT"
+if ( $status != 0 ) then 
+      echo "svn commit failed"
+      cd $IN
+      exit 1
+endif
+
+cd $IN
+
+
+
+
+

Property changes on: utils/tags/utils-00-00-32/update.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: utils/tags/utils-00-00-32/freshtag.sh
===================================================================
--- utils/tags/utils-00-00-32/freshtag.sh	(revision 0)
+++ utils/tags/utils-00-00-32/freshtag.sh	(revision 1712)
@@ -0,0 +1,67 @@
+#!/bin/csh
+
+
+set IN = $PWD
+
+set PACKAGE = ""
+
+set FORCE = ""
+if ( $#argv > 1 ) then 
+  if ( "$1" == "--force" ) then 
+    set FORCE = 1
+    shift
+  endif
+endif
+
+
+if ( $#argv > 2 ) then 
+  set PACKAGE = $1
+  shift
+
+  if ( -d /tmp/$PACKAGE ) then 
+     rm -rf /tmp/$PACKAGE
+  endif
+
+  cd /tmp/	
+  svn co $SVNROOT/$PACKAGE/trunk $PACKAGE
+  cd $PACKAGE
+    
+endif
+
+if ( $#argv > 1 ) then 
+  if ( "$1" == "-m" ) then 
+    shift
+  else 
+    echo "need comment flag -m"
+    exit
+  endif
+endif
+
+echo "updating version $*"
+
+update.sh -m "$*"
+if ( $status != 0 ) then 
+  cd $IN
+  exit 1
+endif
+
+
+echo updating tag
+
+tag.sh  -m  "$*"
+if ( $status != 0 ) then 
+  cd $IN
+  exit 1
+endif
+
+echo preparing tgz file
+
+
+if ( "$FORCE" == 1 ) then 
+  prepare.sh --force
+else
+  prepare.sh
+endif
+
+
+cd $IN

Property changes on: utils/tags/utils-00-00-32/freshtag.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: utils/tags/utils-00-00-32/version.dat
===================================================================
--- utils/tags/utils-00-00-32/version.dat	(revision 0)
+++ utils/tags/utils-00-00-32/version.dat	(revision 1712)
@@ -0,0 +1 @@
+0.0.32
Index: utils/tags/utils-00-00-32/Makefile
===================================================================
--- utils/tags/utils-00-00-32/Makefile	(revision 0)
+++ utils/tags/utils-00-00-32/Makefile	(revision 1712)
@@ -0,0 +1,14 @@
+
+
+install : version increment
+	cp update.sh prepare.sh tag.sh freshtag.sh fetch.sh version increment ~/bin 
+
+
+version : version.cxx
+	g++ -o version version.cxx
+
+increment : version.cxx
+	g++ -o increment version.cxx
+
+clean : 
+	rm version increment
Index: utils/tags/utils-00-00-32/README
===================================================================
--- utils/tags/utils-00-00-32/README	(revision 0)
+++ utils/tags/utils-00-00-32/README	(revision 1712)
@@ -0,0 +1,17 @@
+utils 0.0.32
+------------
+
+useful svn management scripts
+
+update.sh  - increments the version number of the package 
+             uses either the configure.ac version number 
+             or a version.dat file if configure.ac not 
+             available 
+tag.sh     - tags the version automatically finding the 
+             svn archive
+prepare.sh - prepares and uploads the tarball - hepforge specific
+
+freshtag.sh - updates, tags, and then prepares and uploads 
+              the tarball all from one command
+
+ 
Index: utils/tags/utils-00-00-32/basic-install.sh
===================================================================
--- utils/tags/utils-00-00-32/basic-install.sh	(revision 0)
+++ utils/tags/utils-00-00-32/basic-install.sh	(revision 1712)
@@ -0,0 +1,30 @@
+#!/bin/csh 
+
+svn co http://hoppet.hepforge.org/svn/trunk                 hoppet
+svn co http://applgrid.hepforge.org/svn/applgrid/trunk      applgrid
+svn co http://applgrid.hepforge.org/svn/mcfm-6.0/trunk      mcfm-6.0
+svn co http://applgrid.hepforge.org/svn/nlojet-4.0.1/trunk  nlojet-4.0.1
+svn co http://applgrid.hepforge.org/svn/jetmod/trunk        jetmod
+svn co http://applgrid.hepforge.org/svn/lhpdf-1.0.0/trunk   lhpdf-1.0.0
+
+
+set base = $PWD
+
+mkdir $base/install
+
+foreach proj (   hoppet   applgrid   lhpdf-1.0.0  nlojet-4.0.1  jetmod   ) 
+  cd $base/$proj
+  ./configure --prefix=$base/install
+  make 
+  make install
+end
+  
+cd $base/mcfm-6.0
+make 
+
+
+  
+  
+
+
+

Property changes on: utils/tags/utils-00-00-32/basic-install.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: utils/tags/utils-00-00-32/fetch.sh
===================================================================
--- utils/tags/utils-00-00-32/fetch.sh	(revision 0)
+++ utils/tags/utils-00-00-32/fetch.sh	(revision 1712)
@@ -0,0 +1,9 @@
+#!/bin/csh
+
+if ( $#argv < 1 ) then 
+  echo "Usage: fetch.sh <package>
+  exit
+endif
+
+wget http://www.hepforge.org/archive/applgrid/$1
+

Property changes on: utils/tags/utils-00-00-32/fetch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: utils/tags/utils-00-00-32/setarch.sh
===================================================================
--- utils/tags/utils-00-00-32/setarch.sh	(revision 0)
+++ utils/tags/utils-00-00-32/setarch.sh	(revision 1712)
@@ -0,0 +1,30 @@
+#!/bin/csh -f
+
+# /usr/bin/sys
+
+# exit
+
+   
+if ( `uname` == Darwin ) then 
+  if ( `uname -p` == powerpc ) then  
+    set arch = ppc
+  else 
+    if ( `uname -p` == i386 ) then  
+      set arch = x86
+    else
+      set arch = unknown
+    endif   
+  endif
+  
+  set version = `uname -r | sed 's/\..*/0/g' `
+  echo ${arch}_darwin_${version}
+  exit
+else 
+  if ( -e /usr/bin/fs ) then 
+    fs sysname | awk '{print $4}' | sed "s/'//g"
+  else
+    echo `uname -p`-`uname -s`-`uname -r`
+  endif
+endif
+
+

Property changes on: utils/tags/utils-00-00-32/setarch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: utils/tags/utils-00-00-32/tag.sh
===================================================================
--- utils/tags/utils-00-00-32/tag.sh	(revision 0)
+++ utils/tags/utils-00-00-32/tag.sh	(revision 1712)
@@ -0,0 +1,75 @@
+#!/bin/csh
+
+
+set COMMENT = ""
+
+while ( $#argv > 0 ) 
+  if ( "$1" == "-m" ) then
+    shift 
+    if ( $#argv > 0 ) then 
+      set COMMENT = "$1"
+    endif
+  endif
+  shift
+end
+
+if ( "$COMMENT" == "" ) then 
+   echo "no version comment" 
+   exit 1
+endif
+
+
+# set DIR = `grep svn .svn/entries | grep trunk | sed "s_/trunk__" `
+set DIR = `svn info | grep URL | awk '{print$2}' | sed "s_/trunk__" `
+
+if ( $status != 0 ) then 
+   echo "not an svn working repository"
+   exit 1
+endif 
+
+
+
+set PACKAGE = ${DIR:t}
+
+echo "directory $DIR"
+echo "package   $PACKAGE"
+
+
+# get the version number 
+
+if ( -e version.dat ) then 
+    set TAGVERSION = `cat version.dat`
+else 
+  if ( -e configure.ac ) then 
+    set TAGVERSION = `grep AC_INIT configure.ac | sed 's/.*,\(.*\),.*@.*/\1/'`
+  else
+    echo "no tag version"
+    exit 1
+  endif
+endif  
+
+
+set TAGSVNVERSION = `version -s $TAGVERSION`
+
+# does it exist already?
+
+echo "checking tag $DIR/tags/$PACKAGE-$TAGSVNVERSION "
+
+svn ls $DIR/tags/$PACKAGE-$TAGSVNVERSION >& /dev/null
+
+if ( $status == 0 ) then 
+  echo "version already tagged"
+  exit 1
+endif
+
+
+# now tag 
+
+svn copy $DIR/{trunk,tags/$PACKAGE-$TAGSVNVERSION} -m "$COMMENT"
+if ( $status != 0 ) then 
+      echo "svn tag failed"
+      exit 1
+endif
+
+
+

Property changes on: utils/tags/utils-00-00-32/tag.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property