source: genesis/tools/before-commit.sh@ 10088

Last change on this file since 10088 was 10068, checked in by rick, 13 years ago

Check syntax of files.

  • Property svn:executable set to *
File size: 501 bytes
RevLine 
[7075]1#!/bin/sh
2# Check all wleiden.conf files on valid perl syntax for people not familiar
3# with perl to generate right configs
4
[10068]5PATH=$PATH:/usr/local/bin
[7075]6DIRNAME=`dirname $0`
7
8RETVAL=0
[8858]9for FILE in ${DIRNAME}/../nodes/*/wleiden.conf; do
[7254]10 perl -c $FILE
[7075]11 if [ $? -ne 0 ]; then
12 RETVAL=1
13 break
14 fi
15done
16
[7254]17if [ $RETVAL -eq 0 ]; then
[10068]18 python syntax-checker.py
[7254]19 if [ $? -ne 0 ]; then
20 RETVAL=1
21 fi
22fi
23
[7075]24if [ "${RETVAL}" -eq 1 ]; then
25 echo "Please fix errors before commit!"
26 exit 1
27fi
Note: See TracBrowser for help on using the repository browser.