kibana/bin/kibana-plugin
Jonathan Budzenski 218986c07e
Create separate startup scripts for development and production (#13806)
* Use separate startup scripts for development and production

* build kibana directly

* [build] Use downloaded node when pre-optimizing

* clearer variable name

* Add breaking changes docs
2017-11-22 12:49:37 -06:00

25 lines
617 B
Bash
Executable file

#!/bin/sh
SCRIPT=$0
# SCRIPT may be an arbitrarily deep series of symlinks. Loop until we have the concrete path.
while [ -h "$SCRIPT" ] ; do
ls=$(ls -ld "$SCRIPT")
# Drop everything prior to ->
link=$(expr "$ls" : '.*-> \(.*\)$')
if expr "$link" : '/.*' > /dev/null; then
SCRIPT="$link"
else
SCRIPT=$(dirname "$SCRIPT")/"$link"
fi
done
DIR="$(dirname "${SCRIPT}")/.."
NODE="${DIR}/node/bin/node"
test -x "$NODE"
if [ ! -x "$NODE" ]; then
echo "unable to find usable node.js executable."
exit 1
fi
NODE_ENV=production exec "${NODE}" $NODE_OPTIONS --no-warnings "${DIR}/src/cli_plugin" "$@"