diff options
author | Renato Botelho <renato@netgate.com> | 2016-04-21 13:30:48 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-04-21 16:42:00 -0300 |
commit | 463f3d3dfdfc8363c48bfc0391c67e94b319eae0 (patch) | |
tree | 9519ba1e9824eb4e545fda4a8871ab19e0db3ff4 /tools | |
parent | 51247e9379c3e3fb06955d0c4403c82277f4e9cc (diff) | |
download | pfsense-463f3d3dfdfc8363c48bfc0391c67e94b319eae0.zip pfsense-463f3d3dfdfc8363c48bfc0391c67e94b319eae0.tar.gz |
Transfer the logic of rsync dir name to pkg_repo_rsync()
Diffstat (limited to 'tools')
-rw-r--r-- | tools/builder_common.sh | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh index f985e47..eac8135 100644 --- a/tools/builder_common.sh +++ b/tools/builder_common.sh @@ -1839,6 +1839,15 @@ pkg_repo_rsync() { return fi + # Sanitize path + _repo_path=$(realpath ${_repo_path}) + + local _repo_dir=$(dirname ${_repo_path}) + local _repo_base=$(basename ${_repo_path}) + + # Add ./ it's an rsync trick to make it chdir to directory before sending it + _repo_path="${_repo_dir}/./${_repo_base}" + if [ -z "${LOGFILE}" ]; then local _logfile="/dev/null" else @@ -2307,8 +2316,7 @@ poudriere_bulk() { print_error_pfS fi - # ./ is intentional, it's an rsync trick to make it chdir to directory before sending it - pkg_repo_rsync "/usr/local/poudriere/data/packages/./${jail_name}-${POUDRIERE_PORTS_NAME}" + pkg_repo_rsync "/usr/local/poudriere/data/packages/${jail_name}-${POUDRIERE_PORTS_NAME}" done } @@ -2455,8 +2463,7 @@ snapshots_scp_files() { fi snapshots_update_status ">>> Copying core pkg repo to ${PKG_RSYNC_HOSTNAME}" - # Add ./ before last directory, it's an rsync trick to make it chdir to parent directory before sending - pkg_repo_rsync $(echo "${CORE_PKG_PATH}" | sed -E 's,/$,,; s,/([^/]*)$,/./\1,') + pkg_repo_rsync "${CORE_PKG_PATH}" snapshots_update_status ">>> Finished copying core pkg repo" snapshots_update_status ">>> Copying files to ${RSYNCIP}" |