When adding files (or logs) to a context, the files are placed in a
context-specific directory using cp. This causes copies of the files
to be left behind in the working directories of the generating
processes, requiring additional cleanup if the copies are not needed
anymore. However, in the majority of cases, the copy is not needed.
This commit modifies the foundry_context_add_file() and
foundry_context_add_log() functions so that mv is used to place the
files in the context's directory, doing away with the need to clean
up the working directories of the generating processes.
}
main() {
+ opt_add_arg "n" "name" "rv" "" "The name of this instance"
+
if ! opt_parse "$@"; then
return 1
fi
return 1
fi
- if ! cp "$file" "$file_path/."; then
+ if ! mv "$file" "$file_path/."; then
return 1
fi
return 1
fi
- if ! cp "$log" "$logdir/."; then
+ if ! mv "$log" "$logdir/."; then
return 1
fi