pkgdep/git: Use -R instead of -r on freebsd for cp

On Linux, these two options have the same meaning, however, on FreeBSD
systems -r is treated as -RL. This dereferences all the symlinks copying
directly files they point at. This doesn't work very well with git since
it will detect that as a type change, aborting following checkout.

Use -R to make sure all special files are properly copied as well.

Change-Id: Ib066896cf730b0906bcd30449f1e98a31d70ff31
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4185
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Michal Berger 2020-09-11 17:44:54 +02:00 committed by Tomasz Zawadzki
parent 4a50398caf
commit 4ea04101e0

View File

@ -23,7 +23,7 @@ function install_refspdk() {
output_dir="$GIT_REPOS/spdk_$(tr . _ < <(tr -d '[:alpha:]' <<< $last_release))"
if [[ ! -d $output_dir ]]; then
cp -r "$GIT_REPOS/spdk_repo/spdk" "$output_dir"
cp -R "$GIT_REPOS/spdk_repo/spdk" "$output_dir"
fi
git -C "$output_dir" checkout "$last_release"