Re: set -e vs. #!/bin/sh -e
Hi,
The following is quite subjective. I have grown to distrust
#!/bin/sh -e; cause
1) Some systems there was a length contraint on the command name that
could be put on the line (/mnt/usr/group/share/mips3000/2.12/bin/sh
would fail, for example). This is probably not relevant for
Debian.
2) who knows how the script is called? If called with bash script,
then no error detection and safe aborts are possible. Unless I am
quite sure how the script is called, I want the explicit set -e there.
3) I sometimes want to trace my scripts, without loosing the error
correction part. bash -x script works.
4) if people want to turn on error detection, they should copy and
edit my script.
I see no benefit in making it easy to turn error detection
off. It should be done as a matter of last resort. In that case, they
can edit (a copy of) the script.
So, I guess I object to anything like this ever getting into
the Policy standard.
manoj
--
"It had to be said: the world is perishing from an orgy of
self-sacrifice." Howard Roark, in Ayn Rand's _The Fountainhead_
Manoj Srivastava <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05 CC 2D 27 12 1D F5 E8 6E
--
To UNSUBSCRIBE, email to debian-policy-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: