[PerlWikiBot] SF.net SVN: perlwikibot:[79] trunk/no-interwiki/tidy.sh
Status: Pre-Alpha
Brought to you by:
rotemliss
From: <am...@us...> - 2009-09-26 10:51:46
|
Revision: 79 http://perlwikibot.svn.sourceforge.net/perlwikibot/?rev=79&view=rev Author: amire80 Date: 2009-09-26 10:51:33 +0000 (Sat, 26 Sep 2009) Log Message: ----------- Better diff. Modified Paths: -------------- trunk/no-interwiki/tidy.sh Modified: trunk/no-interwiki/tidy.sh =================================================================== --- trunk/no-interwiki/tidy.sh 2009-09-26 10:42:51 UTC (rev 78) +++ trunk/no-interwiki/tidy.sh 2009-09-26 10:51:33 UTC (rev 79) @@ -1,26 +1,33 @@ #!/bin/bash -FN=$1 +FILENAME=$1 echo checking syntax -perl -c $FN +perl -c $FILENAME if [ $? -ne 0 ]; then exit 1 fi echo tidying -perltidy $FN +perltidy $FILENAME if [ $? -ne 0 ]; then exit 1 fi -diff $FN.bak ${FN} -if [ $? -eq 2 ]; then +diff $FILENAME.bak $FILENAME +diff_exit_code=$? + +case $diff_exit_code in +0) + rm $FILENAME.bak +;; +2) + echo trouble in diff after perltidy, exiting. exit 1 -fi +;; +esac echo criticizing -perlcritic -brutal $FN +perlcritic -brutal $FILENAME exit $? - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |