Am 07.01.2016 um 19:04 schrieb Scott Kostyshak <skost...@lyx.org>:
> 
> On Wed, Jan 06, 2016 at 06:58:37PM +0100, Peter Kümmel wrote:
>> 
>> 
>> Am 28.12.2015 um 14:48 schrieb Scott Kostyshak:
>>>> Ah, the cmakebin variable is not set, a rest of the bot script. Replacing 
>>>> the variable by cmake should fix it.
>> 
>> committed this.
>> 
>>> 
>>> Yes this was the problem. There seem to be several unset variables. Can
>>> we use
>>> set -u
>>> with /bin/sh or is that only for bash?
>>> For example, $ver is not set for me.
>> 
>> set -u also stops when there is a test for $1, $2, or if a variable is not
>> set by design, so it could not be used.
> 
> I'm fine without it, but I note that you can set on/off. For
> example (untested):
> 
> set -u
> 
> ...
> 
> set +u
> if [ -z $1 ]
> then
>    echo "Usage: xmingw <path to LyX sources>"
>    exit 1
> fi
> set +u

A working (and perhaps more accurate?) solution

if [ $# -eq 0 ]
then
  echo "Usage: xmingw <path to LyX sources>"
  exit 1
elif [ -z $1 ]
then
  echo "Invalid value for <path to LyX sources>"
  exit 2
fi

Stephan

Reply via email to