It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
set -e makes a bash script to fail on the first command that fails.

It is a good idea to always use it, one might wonder why it is not a bash default.

So problems like this one would not appear:

$ ./start.sh
Installing Din's Curse - Demon War DLC...
tools/gog_com.shlib: line 46: zenity: command not found
tools/gog_com.shlib: line 50: zenity: command not found
df: ‘’: No such file or directory


In fact just adding set -e as second line of start.sh it appears a much cleaner:
$ ./start.sh
Installing Din's Curse - Demon War DLC...
tools/gog_com.shlib: line 46: zenity: command not found
$
Post edited October 09, 2014 by etb
I just learnt something new and useful. Thanks, etb :)
avatar
etb: one might wonder why it is not a bash default.
This. I've often wondered why it's not the default. It seems logical for it to be default.
I'm totally confused but I just bought that game so can someone fill me in using language apt for a slow person like myself? :D
avatar
tinyE: I'm totally confused but I just bought that game so can someone fill me in using language apt for a slow person like myself? :D
If you are using the Linux installers (or tarballs, not sure), the setup script will continue running if it encounters errors, instead of aborting on first error detected. If you are not using the Linux installers (or tarballs), no need to understand, it doesn't concern you.
avatar
etb: set -e makes a bash script to fail on the first command that fails.

It is a good idea to always use it, one might wonder why it is not a bash default.

So problems like this one would not appear:

$ ./start.sh
Installing Din's Curse - Demon War DLC...
tools/gog_com.shlib: line 46: zenity: command not found
tools/gog_com.shlib: line 50: zenity: command not found
df: ‘’: No such file or directory

In fact just adding set -e as second line of start.sh it appears a much cleaner:
$ ./start.sh
Installing Din's Curse - Demon War DLC...
tools/gog_com.shlib: line 46: zenity: command not found
$
Shouldn't this be in the Din's Curse subforum?

http://www.gog.com/forum/dins_curse
avatar
yyahoo: Shouldn't this be in the Din's Curse subforum?
I assume this is a generic script issue, with Din's Curse being provided as an example. So not a problem with a game's installer, but a problem with installers.
Whether aborting on error is needed is debatable though.
avatar
yyahoo: Shouldn't this be in the Din's Curse subforum?
avatar
JMich: I assume this is a generic script issue, with Din's Curse being provided as an example. So not a problem with a game's installer, but a problem with installers.
Whether aborting on error is needed is debatable though.
I see. I guess the OP needs a little better description about the purpose of his posting.
""
bash scripts, probably you should use set -e
""

sounds fairly general to me. And it is meant for gog developers and any other interested, like Barefoot_Monkey.