mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
make -V/--version fast on *nix
This commit is contained in:
parent
63f3535229
commit
7bf89aa53b
1 changed files with 8 additions and 1 deletions
|
@ -46,4 +46,11 @@ fi
|
|||
. "$(cd `dirname $SOURCEPATH`/..; pwd)/bin/logstash.lib.sh"
|
||||
setup
|
||||
|
||||
if [ "$1" = "-V" ] || [ "$1" = "--version" ];
|
||||
then
|
||||
LOGSTASH_VERSION_FILE="${LOGSTASH_HOME}/logstash-core/lib/logstash/version.rb"
|
||||
LOGSTASH_VERSION="$(sed -ne 's/^LOGSTASH_VERSION = "\([^*]*\)"$/\1/p' $LOGSTASH_VERSION_FILE)"
|
||||
echo "logstash $LOGSTASH_VERSION"
|
||||
else
|
||||
ruby_exec "${LOGSTASH_HOME}/lib/bootstrap/environment.rb" "logstash/runner.rb" "$@"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue