Revision 9695
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/util.sh | ||
---|---|---|
667 | 667 |
function to_file() # usage: stdout=... [if_not_exists=1] [del=] to_file cmd... |
668 | 668 |
# auto-removes a command's output file on error (like make's .DELETE_ON_ERROR) |
669 | 669 |
{ |
670 |
echo_func; kw_params stdout |
|
670 |
echo_func; kw_params stdout if_not_exists del
|
|
671 | 671 |
: "${stdout?}"; local del="${del-1}" |
672 | 672 |
if test "$if_not_exists"; then require_not_exists "$stdout" || return 0; fi |
673 | 673 |
|
Also available in: Unified diff
bugfix: lib/sh/util.sh: to_file(): also kw_params the other kw params if_not_exists, del