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
|
--descr xx application description
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
exit 2
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $# -eq 0 ] ; then
|
if [ $# -eq 0 ] ; then
|
||||||
@ -67,13 +67,13 @@ do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$mode" = "" ] ; then
|
if [ -z "$mode" ] ; then
|
||||||
echo Either --desktop or --menu required
|
echo "Either --desktop or --menu required"
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$link" = "" ] ; then
|
if [ -z "$link" ] ; then
|
||||||
echo You must specify a link name with --link
|
echo "You must specify a link name with --link"
|
||||||
usage
|
usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user