Merge pull request 'fix-tempfiles' (#72) from fix-tempfiles into master
All checks were successful
gitea/evobackup/pipeline/head This commit looks good
All checks were successful
gitea/evobackup/pipeline/head This commit looks good
Reviewed-on: #72
This commit is contained in:
commit
859bb800d4
|
@ -399,10 +399,11 @@ build_rsync_main_cmd() {
|
||||||
###################################################################
|
###################################################################
|
||||||
|
|
||||||
# Create a temp file for excludes and includes
|
# Create a temp file for excludes and includes
|
||||||
includes_file="$(mktemp "${PROGNAME}.includes.XXXXXX")"
|
includes_file="$(mktemp --tmpdir "${PROGNAME}.includes.XXXXXX")"
|
||||||
excludes_file="$(mktemp "${PROGNAME}.excludes.XXXXXX")"
|
excludes_file="$(mktemp --tmpdir "${PROGNAME}.excludes.XXXXXX")"
|
||||||
# … and add them to the list of files to delete at exit
|
# … and add them to the list of files to delete at exit
|
||||||
temp_files="${temp_files} ${includes_file} ${excludes_file}"
|
temp_files="${includes_file} ${excludes_file}"
|
||||||
|
trap "rm -f ${temp_files}" EXIT
|
||||||
|
|
||||||
# Store includes/excludes in files
|
# Store includes/excludes in files
|
||||||
# without blank lines of comments (# or ;)
|
# without blank lines of comments (# or ;)
|
||||||
|
|
Loading…
Reference in a new issue