On Sun, Jan 10, 2010 at 4:30 PM, Dr. David Kirkby <david.kir...@onetel.net> wrote: > William Stein wrote: >> >> On Sun, Jan 10, 2010 at 5:55 AM, Dr. David Kirkby >> <david.kir...@onetel.net> wrote: >>> >>> Please read if you intend to edit any shell scripts, such as >>> spkg-install. >> >> ... >> >> Which is just another reason why I personally never ever use "set -e"... >> >> William > > Well, failing to do so does give the problem that if something fails, the > build continues. > > Personally I think exiting with no useful error message is better than > continuing, despite a failure. That results in package appearing to be > successfully installed, when they are not. > > > Obviously, having a useful error message is even better, but it gets a bit > tedious to put a check on every single command.
Is the following possible with sh? Instead of <do something> if [ $? -ne 0 ]; then echo "Foo bar argh" exit 1 fi we make a function so that we can just write <do something> sage-err "Foo bar argh". (causes script to exit). We can ensure that sage-err is defined before spkg-install is run. William
-- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org