Return 2 in case of a usage error.

Use -z instead of comparing to an empty string.
This commit is contained in:
Francois Gouget 2003-09-30 00:28:13 +00:00 committed by Alexandre Julliard
parent 498e1ce039
commit bc4f8f980f
1 changed files with 5 additions and 5 deletions

View File

@ -45,7 +45,7 @@ options:
--descr xx application description
EOF
exit 1
exit 2
}
if [ $# -eq 0 ] ; then
@ -67,13 +67,13 @@ do
esac
done
if [ "$mode" = "" ] ; then
echo Either --desktop or --menu required
if [ -z "$mode" ] ; then
echo "Either --desktop or --menu required"
usage
fi
if [ "$link" = "" ] ; then
echo You must specify a link name with --link
if [ -z "$link" ] ; then
echo "You must specify a link name with --link"
usage
fi