Archived
1
0

Improved install.sh flags

This commit is contained in:
Anmol Sethi
2020-05-22 15:38:03 -04:00
parent 42b5152888
commit 7ef82d8422
8 changed files with 171 additions and 138 deletions

View File

@ -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) \

View File

@ -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 }')"

View File

@ -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/.." "$@"