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

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

Check syntax of files.

  • Property svn:executable set to *
File size: 501 bytes
Line 
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
5PATH=$PATH:/usr/local/bin
6DIRNAME=`dirname $0`
7
8RETVAL=0
9for FILE in ${DIRNAME}/../nodes/*/wleiden.conf; do
10 perl -c $FILE
11 if [ $? -ne 0 ]; then
12 RETVAL=1
13 break
14 fi
15done
16
17if [ $RETVAL -eq 0 ]; then
18 python syntax-checker.py
19 if [ $? -ne 0 ]; then
20 RETVAL=1
21 fi
22fi
23
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.