Stricter checks for proper usage
This commit is contained in:
parent
f2325e6ecb
commit
daba0a1198
17
tests/cpp.sh
17
tests/cpp.sh
|
@ -61,10 +61,19 @@ if [ $# -eq 0 ]; then
|
|||
exit $?
|
||||
fi
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
if [ $# -eq 1 -a -n "$output" ]; then
|
||||
target="$1"
|
||||
output="${target%.cpp}.o"
|
||||
shift
|
||||
|
||||
LD_LIBRARY_PATH="../src" $CPP "$target" > "$output"
|
||||
done
|
||||
elif [ $# -gt 1 -a -z "$output" ]; then
|
||||
while [ $# -gt 0 ]; do
|
||||
target="$1"
|
||||
output="${target%.cpp}.o"
|
||||
shift
|
||||
|
||||
LD_LIBRARY_PATH="../src" $CPP "$target" > "$output"
|
||||
done
|
||||
else
|
||||
_usage
|
||||
exit $?
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user