Changeset 10091 in genesis


Ignore:
Timestamp:
Mar 10, 2012, 2:40:14 PM (13 years ago)
Author:
rick
Message:

Working copies at server, now with new python stuff.

Location:
tools/svn-hook
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tools/svn-hook/genesis-check.sh

    r7306 r10091  
    11#!/bin/sh
    22#
    3 # $Id$
    43# Check for valid genesis syntax
    54# Rick van der Zwet, 2009
     
    87
    98TMPDIR=`mktemp -d -t $(basename $0 .sh)`
     9
     10# Clean up
     11trap "rm -R $TMPDIR; exit 0" 0
     12trap "rm -R $TMPDIR; exit 1" 1 2 15
     13
    1014# External definition used for debugging
    1115SVNLOOK="${SVNLOOK:-/usr/local/bin/svnlook --transaction $TXN}"
    12 GENESISDIR='node-config/genesis/nodes'
     16GENESISDIR='node-config/genesis'
    1317
    1418# Check whether we need to check something first
     
    2024echo "Checking genesis config, please hold your horses..." 1>&2
    2125for ENTRY in `$SVNLOOK tree --full-paths $REPOS $GENESISDIR`; do
     26  echo $ENTRY | grep -q 'retired' && continue
     27
    2228  echo $ENTRY | grep -q '/$'
    2329  if [ $? -eq 0 ]; then
     
    2935
    3036# Do actual checking
    31 sh $TMPDIR/$GENESISDIR/before-commit.sh 2>> $TMPDIR/log.txt 1>>$TMPDIR/log.txt
     37echo $TMPDIR/$GENESISDIR/tools/before-commit.sh 1>&2
     38sh $TMPDIR/$GENESISDIR/tools/before-commit.sh 2>> $TMPDIR/log.txt 1>>$TMPDIR/log.txt
    3239RETVAL=$?
    3340
    3441sed "s+$TMPDIR/node-config/genesis/nodes/++g" $TMPDIR/log.txt 1>&2
    3542
    36 # Clean up
    37 rm -R $TMPDIR
    38 
    3943exit $RETVAL
  • tools/svn-hook/pre-commit

    r7300 r10091  
    11#!/bin/sh
    2 # $Id$
     2#
     3REPOS="$1"
     4TXN="$2"
    35BASEDIR=`dirname $0`
    46
    5 REPOS="$1"
    6 TXN="$2"
     7export PATH=$PATH:/usr/local/bin
     8export PYTHON_EGG_CACHE="/tmp/eggs"
    79
    8 $BASEDIR/genesis-check.sh $REPOS $TXN || exit 1
     10$BASEDIR/genesis-check.sh $REPOS $TXN 2>&1
     11exit $?
    912
    10 # All checks passed, so allow the commit.
    11 exit 0
Note: See TracChangeset for help on using the changeset viewer.