Changeset 10690 in genesis for tools/svn-hook/genesis-check.sh


Ignore:
Timestamp:
May 6, 2012, 8:01:46 PM (13 years ago)
Author:
rick
Message:

Fix issues of not checking duplicates IPs.

While here, add feature that commits which mention no-genesis-check force-fully
overrides the config validators errors.

Related-To: beheer#211

File:
1 edited

Legend:

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

    r10091 r10690  
    22#
    33# Check for valid genesis syntax
    4 # Rick van der Zwet, 2009
     4#
     5# Rick van der Zwet <rick@wirelessleiden.nl>
     6#
    57REPOS="$1"
    68TXN="$2"
    79
    810TMPDIR=`mktemp -d -t $(basename $0 .sh)`
    9 
    10 # Clean up
    11 trap "rm -R $TMPDIR; exit 0" 0
    12 trap "rm -R $TMPDIR; exit 1" 1 2 15
    1311
    1412# External definition used for debugging
     
    1715
    1816# Check whether we need to check something first
    19 $SVNLOOK changed $REPOS | grep -q $GENESISDIR
     17$SVNLOOK changed -t $TXN $REPOS | grep -q $GENESISDIR
    2018if [ $? -eq 1 ]; then
    2119  exit 0
    2220fi
     21
     22# Allow us to commit stuff even if the validator fails
     23$SVNLOOK log -t $TXN $REPOS | grep -q 'no-genesis-check' && exit 0
     24
     25# Clean up on exit
     26trap "rm -R $TMPDIR" 0 1 2 3 15
    2327
    2428echo "Checking genesis config, please hold your horses..." 1>&2
Note: See TracChangeset for help on using the changeset viewer.