Re: [gnome-love] autogen.sh clarification



Also, it's not just a comment. The first line when it has a #! tells the
system which program to load the script with.

http://wiki.bash-hackers.org/dict/terms/interpreter_directive

On 09/10/2013 04:09 PM, Hashem Nasarat wrote:
man sh on debian unstable reports:

-e errexit If not interactive, exit immediately if any untested
command fails. The exit status of a command is considered to be
explicitly tested if the command is used to control an if, elif,
while, or until; or if the command is the left hand operand of an “&&”
or “||” operator.
On 09/10/2013 03:58 PM, fr33domlover wrote:
Hello people,

I don't know much about Bash scripting, but recently I started a new git
repo and I decided to do some research before that. I want to prepare a
project template, which can be used to easily start new repos (it will
contain all the files required by GNU, script to auto-generate ChangeLog
and Doxygen/Devhelp files, etc.).

I started writing a simple autogen.sh and then I noticed a comment at
the beginning. In some git modules the comment looks like this:

#!/bin/sh

And in others like this:

#!/bin/sh -e

I tried to find out what the -e option does. I tried sh --help. I tried
man sh. I tried a web search. But I found nothing, as if the option
doesn't exist at all.



So my question is simple? What is the difference between sh and sh -e?

I realize it's just a comment, but if the -e option makes a difference
(I guess it does, otherwise it wouldn't be there in the first place),
I'd like to know what.


Thank you in advance!
fr33domlover

_______________________________________________
gnome-love mailing list
gnome-love gnome org
https://mail.gnome.org/mailman/listinfo/gnome-love



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]