Stricter checks for proper usage

This commit is contained in:
Pierre Pronchery 2014-11-12 21:55:07 +01:00
parent f2325e6ecb
commit daba0a1198

View File

@ -61,6 +61,11 @@ if [ $# -eq 0 ]; then
exit $? exit $?
fi fi
if [ $# -eq 1 -a -n "$output" ]; then
target="$1"
LD_LIBRARY_PATH="../src" $CPP "$target" > "$output"
elif [ $# -gt 1 -a -z "$output" ]; then
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
target="$1" target="$1"
output="${target%.cpp}.o" output="${target%.cpp}.o"
@ -68,3 +73,7 @@ while [ $# -gt 0 ]; do
LD_LIBRARY_PATH="../src" $CPP "$target" > "$output" LD_LIBRARY_PATH="../src" $CPP "$target" > "$output"
done done
else
_usage
exit $?
fi