From 3b50e5c3d05ebd7047aacf50743c071a9747f9b3 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Wed, 2 Sep 2015 09:13:02 +0200 Subject: [PATCH] Handle filenames / dirnames with spaces --- check.sh | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) 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 -- 1.7.1