Index: contrib/trunk/scripts/internal/common.sh =================================================================== --- contrib/trunk/scripts/internal/common.sh (revision 1172) +++ contrib/trunk/scripts/internal/common.sh (revision 1173) @@ -1,112 +1,114 @@ # a list of definitions and tools that we'd like to ave an easy access # to # svn repositories for read and write access -svn_read=http://fastjet.hepforge.org/svn/contrib -svn_write=https://fastjet.hepforge.org/svn/contrib +#svn_read=http://fastjet.hepforge.org/svn/contrib +#svn_write=https://fastjet.hepforge.org/svn/contrib +svn_read=svn+ssh://vcs@phab.hepforge.org/source/fastjetsvn/contrib +svn_write=svn+ssh://vcs@phab.hepforge.org/source/fastjetsvn/contrib #svn_write=svn+ssh://svn.hepforge.org/hepforge/svn/fastjet/contrib # get the svn URL and fill # - mode : ro if http:// access; rw otherwise # - version : the version info # [None] is returned if the directory does not exist # [NoSVN] is returned if the directory is not under svn # # get_svn_info contrib mode version function get_svn_info(){ local __modevar=$2 local __versionvar=$3 # check if the directory exists if [[ ! -d $1 ]]; then eval $__modevar="[None]" eval $__versionvar="[None]" return 0 fi cd $1 # check if this is in svn svn info > /dev/null 2>&1 || { eval $__modevar="[NoSVN]" eval $__versionvar="[NoSVN]" cd .. return 0 } # get the full URL svn_url=$(svn info | grep "^URL:" | sed 's/^URL: //') eval $__versionvar="${svn_url#*/$1/}" if [[ "$svn_url" == "http:"* ]]; then eval $__modevar="ro" else eval $__modevar="rw" fi cd .. return 0 } # get an entry from a contrib file, filling the "version" variable # vwith the version number # # get_contrib_version contrib_name file version function get_contrib_version(){ local __resultvar=$3 # nasty hack: if the name of the "file" is "local_svn", # get the version number from the local svn checkout of the contribution if [[ "$2" == "local_svn" ]]; then get_svn_info $1 mode version eval $__resultvar="$version" return 0 fi # now deal with the version number as if it was an entry in "file" $2 if [[ -e $2 ]]; then # check if the file actually exists # entry=$(grep "^[ \t]*$1[ \t]" $2) # does not seem to work with tabs entry=$(grep "^[[:space:]]*$1[[:space:]]" $2) if [ -z "$entry" ]; then eval $__resultvar="[None]" else eval $__resultvar="`echo $entry | awk '{print $2}'`" fi else # file does not exist eval $__resultvar="[None]" fi } # get a yes/no answer # returns 0 for n/N/no # 1 for y/Y/yes function get_yesno_answer(){ while true; do echo -ne "$1 [y/n] " if [[ -z "$2" ]]; then read answer else answer="$2" # TODO: add a test that the answer is a valid one echo "$2" fi case $answer in y|Y|yes) return 1; break ;; n|N|no) return 0; break ;; esac done } # check if the local svn has pending modifications # check_pending_modifications contrib function check_pending_modifications(){ cd $1 result=$(svn status | grep -v "^?") if [[ ! -z "$result" ]]; then svn status | grep -v "^?" cd .. return 1 fi cd .. return 0 } Index: contrib/trunk/scripts/internal/generate-html-contents.pl =================================================================== --- contrib/trunk/scripts/internal/generate-html-contents.pl (revision 1172) +++ contrib/trunk/scripts/internal/generate-html-contents.pl (revision 1173) @@ -1,113 +1,115 @@ #!/usr/bin/perl -w # # Generate an html contents file for the current version of fjcontrib # # To be run from the main directory of a checkout of fjcontrib. # Best run from a directory that is a clean checkout of a tag. # # set to 1 to sort contribs alphabetically, 0 otherwise $sort=1; # set to 1 to include release date taken from svn tags, 0 otherwise. $include_date=1; $versions="contribs.svn"; -$svn="http://fastjet.hepforge.org/svn/contrib/contribs/"; +#$svn="http://fastjet.hepforge.org/svn/contrib/contribs/"; +$svn_read="svn+ssh://vcs@phab.hepforge.org/source/fastjetsvn/contrib"; +$svn=$svn_read."/contribs/"; $topversion=`head -1 VERSION`; chomp $topversion; # read in contribs.svn file, fill contribs hash open (VERSIONS, "<$versions") || die "Could not open $versions"; %contribs_hash=(); $contribs_array=(); while ($line = ) { if ($line =~ /^\s*([a-z][^\s]*)\s+([^\s]*)/i) { $contrib = $1; $version = $2; push @contribs_array, $contrib; $contribs_hash{$contrib} = $version; } } # sort contribs by alphabetical order if ($sort) { @contribs_array = sort keys %contribs_hash; } # write out html table $list=''; foreach ( @contribs_array ) { $contrib = $_; $version = $contribs_hash{$_}; if ($version =~ /^[0-9]/) {$version = "tags/$version";} ($textversion = $version) =~ s/tags\///; if($include_date) { # extract date of last version tag from svn $date = `svn info $svn$contrib/$version | grep "Last Changed Date" | awk '{print \$4}'`; # One could also use the --xml option and parse appropriately the output: # $date = `svn --xml list $svn$contrib/$version`; # At this stage, XML parsing is not implemented though. # #print $contrib." ".$date."\n"; } $list .= " $contrib $textversion "; if ($include_date) {$list .= "$date";} $list .= ""; if (-e "$contrib/README") { $list .= 'README '; } if (-e "$contrib/NEWS") { $list .= 'NEWS '; } $list .= "\n"; } $head=' Version '.$topversion.' of FastJet Contrib is distributed with the following packages

'; if($include_date) {$head .= ' ';} $head .= ' '; $tail='
Package VersionRelease dateInformation
'; print $head, $list, $tail; Index: contrib/trunk/scripts/internal/check-updates.sh =================================================================== --- contrib/trunk/scripts/internal/check-updates.sh (revision 1172) +++ contrib/trunk/scripts/internal/check-updates.sh (revision 1173) @@ -1,46 +1,46 @@ #!/bin/bash # # check if the versions in contrib.svn correspond to the latest tags # preamble if [ x`which tput` != "x" ]; then GREEN=$(tput setaf 2) RED=$(tput setaf 1) NORMAL=$(tput sgr0) fi . `dirname $0`/common.sh # get the list of contribs (discard "graveyard" -contrib_list=`svn ls http://fastjet.hepforge.org/svn/contrib/contribs/ | grep -v graveyard | sed 's/\///g'` +contrib_list=`svn ls $svn_read/contribs/ | grep -v graveyard | sed 's/\///g'` # loop over contribs printf " %-25s %-15s %-15s\n" "contrib" "contribs.svn" "svn tag" printf " %-25s %-15s %-15s\n" "-------" "------------" "-------" for contrib in $contrib_list; do # check version in contribs.svn get_contrib_version $contrib contribs.svn version_included version_included=`echo $version_included | sed 's/.*\///'` # check latest svn tag - version_tag=`svn ls http://fastjet.hepforge.org/svn/contrib/contribs/${contrib}/tags | grep -E "^[0-9].[0-9].[0-9]/$" | tail -n1 | sed 's/\///g'` + version_tag=`svn ls $svn_read/contribs/${contrib}/tags | grep -E "^[0-9].[0-9].[0-9]/$" | tail -n1 | sed 's/\///g'` # see if that agrees if [ x"$version_included" == x"$version_tag" ]; then col=$GREEN elif [ x"$version_included" == x"[None]" ]; then if [ x"$version_tag" == x"" ]; then col=$NORMAL else col=$RED fi elif [ x"$version_included" \> x"$version_tag" ]; then col=$NORMAL else col=$RED fi printf "%s %-25s %-15s %-15s%s\n" ${col} $contrib $version_included $version_tag $NORMAL done Index: contrib/trunk/README =================================================================== --- contrib/trunk/README (revision 1172) +++ contrib/trunk/README (revision 1173) @@ -1,59 +1,66 @@ This is the README file for the fastjet-contrib project http://fastjet.hepforge.org/contrib/ which provides a library of 3rd-party add-ons to FastJet (http://fastjet.fr/) ====================================================================== Instructions for generic users ------------------------------ You should have downloaded a tarball for the contrib. Unpack it, enter the resulting directory and run ./configure [--fastjet-config=FILE] [--prefix=...] [...] make make check # optional make install Once you have installed, a contrib named XYZ will typically be accessible through a line #include "fastjet/contrib/XYZ.hh" with the corresponding library available through -lXYZ . Queries about the fastjet-contrib project as a whole should be sent to Queries about individual contribs should be sent to the people mentioned in the contrib/AUTHORS file ====================================================================== For users who want the latest version (and for developers) ---------------------------------------------------------- +To get started, you will need an account on hepforge. If you don't +have one yet, go to + + https://www.hepforge.org/register + +to create it. + Get an svn checkout of the top-level directory - svn co http://fastjet.hepforge.org/svn/contrib/trunk fjcontrib + svn co svn+ssh://vcs@phab.hepforge.org/source/fastjetsvn/contrib/trunk fjcontrib which contains the scripts and a current list of contribs and their versions. Within the fjcontrib directory, get the contribs themselves by running - ./scripts/update-contribs.sh + ./scripts/update-contribs.sh usually, the contribs are tagged (released) versions and there is one svn checkout for each contrib. Then proceed with configure, make, etc. To get updates at a later stage: - ./scripts/update-contribs.sh # all contribs - ./scripts/update-contribs.sh ContribName # just a specific contrib - ./scripts/update-contribs.sh ContribName version # specific version of a contrib + ./scripts/update-contribs.sh # all contribs + ./scripts/update-contribs.sh ContribName # just a specific contrib + ./scripts/update-contribs.sh ContribName version # specific version of a contrib The command always updates the top level directory. If "version" is "trunk", then you get the development area for the Contrib -- do this only if you're a developer of that contrib. For further information on development, see the file DEVEL-GUIDELINES.