The initial version of the postinstall script used -rT which copies recursively (-r) and ensures that the source directory isn't copied inside the target (-T)
Unfortunately, the BSD variant of cp that ships with macOS doesn't support the -T flag.
To work around this we're splitting the command into pre and post install steps; the preinstall ensures the fonts and images directories are present and the postinstall copies the files from node_modules to them.
The initial version of the postinstall script used
-rT
which copies recursively (-r
) and ensures that the source directory isn't copied inside the target (-T
)Unfortunately, the BSD variant of cp that ships with macOS doesn't support the
-T
flag.To work around this we're splitting the command into pre and post install steps; the preinstall ensures the fonts and images directories are present and the postinstall copies the files from
node_modules
to them.