Improved install.sh flags
This commit is contained in:
@ -9,7 +9,7 @@ MINIFY=${MINIFY-true}
|
||||
main() {
|
||||
cd "$(dirname "${0}")/../.."
|
||||
|
||||
npx tsc --outDir out --tsBuildInfoFile .cache/out.tsbuildinfo
|
||||
tsc --outDir out --tsBuildInfoFile .cache/out.tsbuildinfo
|
||||
# If out/node/entry.js does not already have the shebang,
|
||||
# we make sure to add it and make it executable.
|
||||
if ! grep -q -m1 "^#!/usr/bin/env node" out/node/entry.js; then
|
||||
@ -17,7 +17,7 @@ main() {
|
||||
chmod +x out/node/entry.js
|
||||
fi
|
||||
|
||||
npx parcel build \
|
||||
parcel build \
|
||||
--public-url "/static/$(git rev-parse HEAD)/dist" \
|
||||
--out-dir dist \
|
||||
$([[ $MINIFY ]] || echo --no-minify) \
|
||||
|
@ -34,7 +34,8 @@ main() {
|
||||
}
|
||||
|
||||
bundle_dynamic_lib() {
|
||||
lib_name="$1"
|
||||
local lib_name="$1"
|
||||
local lib_path
|
||||
|
||||
if [[ $OS == "linux" ]]; then
|
||||
lib_path="$(ldd "$RELEASE_PATH/lib/node" | grep "$lib_name" | awk '{print $3 }')"
|
||||
|
@ -19,7 +19,7 @@ bin_dir() {
|
||||
BIN_DIR=$(bin_dir)
|
||||
if [ "$(uname)" = "Linux" ]; then
|
||||
export LD_LIBRARY_PATH="$BIN_DIR/../lib${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}"
|
||||
else
|
||||
elif [ "$(uname)" = "Darwin" ]; then
|
||||
export DYLD_LIBRARY_PATH="$BIN_DIR/../lib${DYLD_LIBRARY_PATH+:$DYLD_LIBRARY_PATH}"
|
||||
fi
|
||||
exec "$BIN_DIR/../lib/node" "$BIN_DIR/.." "$@"
|
||||
|
Reference in New Issue
Block a user