Revision 9073
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/util.sh | ||
---|---|---|
284 | 284 |
top_dir="$(dirname "$top_script")" |
285 | 285 |
|
286 | 286 |
require_exists () # usage: require_exists file || return 0 |
287 |
{ test ! -e "$1" || die "? file "$1" already exists, skipping"; }
|
|
287 |
{ test ! -e "$1" || type=info die "file "$1" already exists, skipping"; }
|
|
288 | 288 |
|
289 | 289 |
# auto-removes a command's output file on error (like make's .DELETE_ON_ERROR) |
290 | 290 |
function to_file () # usage: stdout=... [if_not_exists=1] to_file cmd... |
Also available in: Unified diff
lib/sh/util.sh: require_exists (): use die/log_info's new support for info messages using $type