Because we don't know if mac BSD cp or GNU cp will be first on the path,
where there is ambiguity (e.g. with -R flag), we will use the macOS cp
command in /bin to ensure that we have consistent results. The
alternative would be to fixup each instance of the cp parameters so that
they work consistently with either cp command, but given these scripts
can run only on macOS, that seems unnecessary.
This replaces the earlier change in 97c6331b5.
shellHelperFunctions.sh currently needs build-utils.sh sourced first in
order to parse. As we are planning to merge these two scripts, I am okay
with this for now. But we need to make sure that prerequisite is met for
now.
I ran the following command to find scripts that referenced
shellHelperFunctions.sh but not build-utils.sh:
grep -L build-utils.sh $(grep -lR shellHelperFunctions --include='*.sh' .)
The following files were found:
./mac/bashHelperFunctions.sh
./mac/setup/build.sh
./resources/build/history/history-utils.sh
* bashHelperFunctions.sh has only a comment reference, so it's okay.
* mac/setup/build.sh I have reworked to include build-utils.sh.
* history-utils.sh is used only by ios/tools/prepRelease.sh, and that
script already includes build-utils.sh.
Fixes up scripts (except under /linux) to use `#!/usr/bin/env bash`
instead of `#!/bin/bash` or `#!/bin/sh` so that we don't end up with
the ancient version of bash supplied with macOS.
This became urgent with this PR, because of bash-4.xisms in
build-utils.sh, for example on line 572:
```
if [[ -v _builder_params[$e] ]]; then
```
Fixes#5700.
Adds support for arm64 (M1) to textinputsource in the Keyman app. All
other executables are already fat with support for both x86_64 and
arm64.
The installer did not work on downlevel versions
of macOS as the compile in Script Editor produced
a 10.15-compatible version. Now we build the app
directly from source with osacompile and bundle
that instead.
First steps towards a clean install script
for Keyman for Mac. Some steps still out-
of-order for now, particularly opening
System Preferences to allow Keyman before
Keyman has run for first time.