Return 2 in case of a usage error.
Use -z instead of comparing to an empty string.
This commit is contained in:
parent
498e1ce039
commit
bc4f8f980f
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue