Skip to content

Conversation

@nnethercote
Copy link
Contributor

The existing command used is cp -r -T -- src_dir dst_dir. But
-T doesn't work on Mac.

This commit changes it to cp -r src_dir/. dst_dir.

  • Appending the . has the same effect as -T: copy the contents of
    src_dir without copy src_dir itself.

  • Also, -R is POSIX but -r is not.

The existing command used is `cp -r -T -- src_dir dst_dir`. But
-T doesn't work on Mac.

This commit changes it to `cp -r src_dir/. dst_dir`.

- Appending the `.` has the same effect as -T: copy the contents of
  `src_dir` without copy `src_dir` itself.

- Also, -R is POSIX but -r is not.
@nnethercote
Copy link
Contributor Author

This came up in rust-lang/rust#53793 (comment), where @toidiu is trying to profile on Mac. For me, it helped, but Cachegrind doesn't run rustc properly and so I end up getting another error further along. Still, seems worth landing.

@Mark-Simulacrum
Copy link
Member

Thanks! Can't say I'm too familiar with the details myself but this seems fine; we can reimplement the copy in rust if needed.

@Mark-Simulacrum Mark-Simulacrum merged commit ea8ca9d into rust-lang:master Oct 5, 2018
@nnethercote nnethercote deleted the rm-cp-T branch October 5, 2018 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants