Skip to content

Change a cp command. #288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 5, 2018
Merged

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