diff options
author | Teddy <[email protected]> | 2014-04-11 18:09:47 +0800 |
---|---|---|
committer | Teddy <[email protected]> | 2014-04-11 18:09:47 +0800 |
commit | e3907f9af283c71b635a51265a155ee00e7ef81e (patch) | |
tree | 1008c4b1f4e9e22b0c1e89c2928d7c420b914443 /test_all.sh | |
parent | 596660487a61bd219253d0b3da382c5b02dc20ed (diff) |
handle empty parameter correctly
Diffstat (limited to 'test_all.sh')
-rwxr-xr-x | test_all.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test_all.sh b/test_all.sh index cb2aa87..fcf757c 100755 --- a/test_all.sh +++ b/test_all.sh @@ -1,5 +1,9 @@ #! /bin/bash -for file in testcases/*.c +dir=testcases/*.c +if [ "$#" != 0 ]; then + dir=$1 +fi +for file in $dir do gcc $file -o /dev/null &> /dev/null gcc_ret="$?" |