mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-18 22:37:43 +00:00
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 ```
25 lines
862 B
Bash
Executable file
25 lines
862 B
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# postbuild script run by npm during/after a build
|
|
#
|
|
|
|
# Exit on command failure and when using unset variables:
|
|
set -eu
|
|
|
|
## START STANDARD BUILD SCRIPT INCLUDE
|
|
# adjust relative paths as necessary
|
|
THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")"
|
|
. "$(dirname "$THIS_SCRIPT")/../../../resources/build/build-utils.sh"
|
|
## END STANDARD BUILD SCRIPT INCLUDE
|
|
|
|
. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh"
|
|
|
|
LOCAL_ROOT="$(dirname "$THIS_SCRIPT")"
|
|
|
|
mkdir -p "$LOCAL_ROOT/dist/site/"
|
|
mkdir -p "$LOCAL_ROOT/dist/win32/"
|
|
cp -r "$LOCAL_ROOT/src/site/"** "$LOCAL_ROOT/dist/site/"
|
|
cp -r "$LOCAL_ROOT/src/win32/"** "$LOCAL_ROOT/dist/win32/"
|
|
|
|
replaceVersionStrings "$LOCAL_ROOT/dist/site/lib/sentry/init.js.in" "$LOCAL_ROOT/dist/site/lib/sentry/init.js"
|
|
rm "$LOCAL_ROOT/dist/site/lib/sentry/init.js.in"
|