fix: use -R instead of -r in cp calls so macos & linxu behavior is the same (#58)
This commit is contained in:
parent
e30e89fa3d
commit
e679a26b42
|
@ -85,7 +85,7 @@ def copy_cmd(ctx, src_file, src_path, dst):
|
|||
# buildifier: disable=function-docstring
|
||||
def copy_bash(ctx, src_file, src_path, dst):
|
||||
if dst.is_directory:
|
||||
cmd_tmpl = "rm -rf \"$2\" && cp -rf \"$1/\" \"$2\""
|
||||
cmd_tmpl = "rm -rf \"$2\" && cp -fR \"$1/\" \"$2\""
|
||||
mnemonic = "CopyDirectory"
|
||||
progress_message = "Copying directory %s" % src_path
|
||||
else:
|
||||
|
|
|
@ -90,7 +90,7 @@ if [[ -f "{src}" ]]; then
|
|||
cp -f "{src}" "{dst}"
|
||||
else
|
||||
mkdir -p "{dst}"
|
||||
cp -rf "{src}"/* "{dst}"
|
||||
cp -fR "{src}"/* "{dst}"
|
||||
fi
|
||||
""".format(src = src_path, dst_dir = skylib_paths.dirname(dst_path), dst = dst_path))
|
||||
|
||||
|
|
|
@ -167,7 +167,7 @@ if [[ -f "$in" ]]; then
|
|||
chmod 664 "$out"
|
||||
else
|
||||
mkdir -p "$out"
|
||||
cp -rf "$in"/* "$out"
|
||||
cp -fR "$in"/* "$out"
|
||||
chmod 664 "$out"/*
|
||||
fi
|
||||
""".format(in_path = in_path, out_path = out_path))
|
||||
|
|
Loading…
Reference in New Issue