Skip to content

Commit 509b5aa

Browse files
lamcwjsharpe
andauthored
Portable copy_dir_contents_to_dir (#1246)
Co-authored-by: James Sharpe <[email protected]>
1 parent af66969 commit 509b5aa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

foreign_cc/private/framework/toolchains/freebsd_commands.bzl

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ fi
9595
)
9696

9797
def copy_dir_contents_to_dir(source, target):
98-
# Beause FreeBSD `cp` doesn't have `--no-copy-directory`, we have to
98+
# Beause FreeBSD `cp` doesn't have `--no-target-directory`, we have to
9999
# do something more complex for this environment.
100100
return """\
101101
if [[ -d "{source}" ]]; then
102-
cp -L -R "{source}"/* "{target}"
102+
cp -L -R "{source}"/. "{target}"
103103
else
104104
cp -L -R "{source}" "{target}"
105105
fi

foreign_cc/private/framework/toolchains/macos_commands.bzl

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ fi
8686
)
8787

8888
def copy_dir_contents_to_dir(source, target):
89-
# Beause macos `cp` doesn't have `--no-copy-directory`, we have to
89+
# Beause macos `cp` doesn't have `--no-target-directory`, we have to
9090
# do something more complext for this environment.
9191
return """\
9292
if [[ -d "{source}" ]]; then
93-
cp -L -R "{source}"/ "{target}"
93+
cp -L -R "{source}"/. "{target}"
9494
else
9595
cp -L -R "{source}" "{target}"
9696
fi

0 commit comments

Comments
 (0)