Project

General

Profile

« Previous | Next » 

Revision 12798

lib/sh/util.sh: added rethrow_exit alias

View differences:

trunk/lib/sh/util.sh
222 222
alias rethrow!='return "$e"'
223 223
	# can't use `(exit "$e")` because a bug in bash prevents subshells from
224 224
	# triggering errexit (would need to append `|| return` for it to work)
225
alias rethrow_subshell!='exit "$e"'
225
alias rethrow_exit!='exit "$e"'
226 226

  
227 227
alias rethrow='{ if test "$e" != 0; then rethrow!; fi; }'
228
alias rethrow_subshell='{ if test "$e" != 0; then rethrow_subshell!; fi; }'
228
alias rethrow_exit='{ if test "$e" != 0; then rethrow_exit!; fi; }'
229
alias rethrow_subshell='rethrow_exit'
229 230

  
230 231
fi # load new aliases
231 232
if self_being_included; then

Also available in: Unified diff