Changeset 10091 in genesis for tools/svn-hook/genesis-check.sh
- Timestamp:
- Mar 10, 2012, 2:40:14 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/svn-hook/genesis-check.sh
r7306 r10091 1 1 #!/bin/sh 2 2 # 3 # $Id$4 3 # Check for valid genesis syntax 5 4 # Rick van der Zwet, 2009 … … 8 7 9 8 TMPDIR=`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 13 10 14 # External definition used for debugging 11 15 SVNLOOK="${SVNLOOK:-/usr/local/bin/svnlook --transaction $TXN}" 12 GENESISDIR='node-config/genesis /nodes'16 GENESISDIR='node-config/genesis' 13 17 14 18 # Check whether we need to check something first … … 20 24 echo "Checking genesis config, please hold your horses..." 1>&2 21 25 for ENTRY in `$SVNLOOK tree --full-paths $REPOS $GENESISDIR`; do 26 echo $ENTRY | grep -q 'retired' && continue 27 22 28 echo $ENTRY | grep -q '/$' 23 29 if [ $? -eq 0 ]; then … … 29 35 30 36 # Do actual checking 31 sh $TMPDIR/$GENESISDIR/before-commit.sh 2>> $TMPDIR/log.txt 1>>$TMPDIR/log.txt 37 echo $TMPDIR/$GENESISDIR/tools/before-commit.sh 1>&2 38 sh $TMPDIR/$GENESISDIR/tools/before-commit.sh 2>> $TMPDIR/log.txt 1>>$TMPDIR/log.txt 32 39 RETVAL=$? 33 40 34 41 sed "s+$TMPDIR/node-config/genesis/nodes/++g" $TMPDIR/log.txt 1>&2 35 42 36 # Clean up37 rm -R $TMPDIR38 39 43 exit $RETVAL
Note:
See TracChangeset
for help on using the changeset viewer.