Skip to content

`cp -r` is deprecated on BSD/macOS. Use `cp -R` instead.

samuela requested to merge samuela/cookbook:samuela-master-patch-29902 into master

This step of the build fails on macOS at the moment:

$ make all
...
./make-ca.sh: line 726: c_rehash: command not found
cook - ca-certificates stage
cook - ca-certificates unstage
cp: the -H, -L, and -P options may not be specified with the -r option.
./repo.sh failed.make: *** [build/filesystem.bin] Error 1

According to the man page on macOS,

COMPATIBILITY
     Historic versions of the cp utility had a -r option.  This implementation
     supports that option; however, its use is strongly discouraged, as it
     does not correctly copy special files, symbolic links, or fifo's.

The GNU coreutils version supports both -r and -R identically. From http://man7.org/linux/man-pages/man1/cp.1.html,

       -R, -r, --recursive
              copy directories recursively

Merge request reports