From: Thomas Jarosch Date: Wed, 2 Sep 2015 07:13:02 +0000 (+0200) Subject: Handle filenames / dirnames with spaces X-Git-Tag: v1.2~108 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=3b50e5c3d05ebd7047aacf50743c071a9747f9b3;p=pyi2ncommon Handle filenames / dirnames with spaces --- diff --git a/check.sh b/check.sh index f1a9323..4bd7204 100755 --- a/check.sh +++ b/check.sh @@ -13,17 +13,17 @@ fi # look for test in guest tests test_file= -if [ -f $1 ]; then - test_file=$1 +if [ -f "$1" ]; then + test_file="$1" fi # look for test in guest tests -if [ -f $1.py ]; then - test_file=$1.py +if [ -f "$1.py" ]; then + test_file="$1.py" fi # error if not found yet -if [ $test_file = "" ]; then +if [ "$test_file" = "" ]; then echo "Could not find $1!" exit 2 fi @@ -36,14 +36,14 @@ echo # run pep8 echo "pep8:" -pep8 $test_file +pep8 "$test_file" pep8_return=$? echo # done echo Done checking if [[ $pylint_return == 0 && $pep8_return == 0 ]]; then - echo Everything seems to be fine + echo "Everything seems to be fine" else - echo Please correct + echo "Please correct" fi