Improve run-example.sh

- More usage example
- Newlines for prettier output
This commit is contained in:
Trustin Lee 2014-05-20 23:38:53 +09:00
parent 4436870b28
commit e61ad7f80b
1 changed files with 3 additions and 0 deletions

View File

@ -28,11 +28,14 @@ done
if [[ -z "$EXAMPLE" ]] || [[ -z "$EXAMPLE_CLASS" ]] || [[ $# -ne 0 ]]; then
echo " Usage: $0 [-D<name>[=<value>] ...] <example-name>" >&2
echo "Example: $0 -Dport=8443 -Dssl http-server" >&2
echo " $0 -Dhost=127.0.0.1 -Dport=8009 echo-client" >&2
echo >&2
echo "Available examples:" >&2
echo >&2
for E in "${!EXAMPLE_MAP[@]}"; do
echo " $E"
done | sort >&2
echo >&2
exit 1
fi