Shell Scripts

- Fixing the *nix version to use the right script variable
- Adding windows bat file
- Adding an INSTALL readme
This commit is contained in:
Chris Cowan 2014-08-27 14:10:42 -07:00
parent 3a9263e9fa
commit 0fa83908e0
6 changed files with 49 additions and 9 deletions

0
src/server/INSTALL Normal file
View file

23
src/server/bin/kibana.bat Normal file
View file

@ -0,0 +1,23 @@
@echo off
SETLOCAL
if NOT DEFINED JAVA_HOME goto java_home_err
set SCRIPT_DIR=%~dp0
for %%I in ("%SCRIPT_DIR%..") do set DIR=%%~dpfI
set RACK_ENV=production
set CONFIG_PATH=%DIR%\config\kibana.yml
TITLE Kibana 4.0.0-BETA
"%JAVA_HOME%\bin\java" -jar "%DIR%\lib\kibana.jar" %*
:java_home_err
echo JAVA_HOME enviroment variable must be set!
pause
:finally
ENDLOCAL

View file

@ -1,6 +1,19 @@
#!/bin/sh
SCRIPT=$(readlink -f "${0}")
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}")
if [ -x "${JAVA_HOME}/bin/java" ]; then
@ -14,4 +27,4 @@ if [ ! -x "${JAVA}" ]; then
exit 1
fi
CONFIG_PATH=${DIR}/../config/kibana.yml RACK_ENV=production exec "${JAVA}" -jar "${DIR}/../lib/kibana.jar"
CONFIG_PATH=${DIR}/../config/kibana.yml RACK_ENV=production exec "${JAVA}" -jar "${DIR}/../lib/kibana.jar" "$@"

View file

@ -6,7 +6,7 @@ module.exports = function (grunt) {
return _.mapValues({
build_zip: archiveName() + '.zip',
build_tarball: archiveName() + '.zip',
build_tarball: archiveName() + '.tar.gz',
plugin: archiveName(true) + '.tar.gz'
}, function (filename, task) {
return {
@ -16,11 +16,11 @@ module.exports = function (grunt) {
files: [
{
expand: true,
cwd: '<%= build %>',
cwd: '<%= build %>/dist',
src: ['**/*'],
dest: '<%= pkg.name %>' + (task === 'plugin' ? '/_site' : '')
}
]
};
});
};
};

View file

@ -18,6 +18,14 @@ module.exports = function (grunt) {
dist: {
options: { mode: true },
files: [
{
src: '<%= build %>/kibana/INSTALL',
dest: '<%= build %>/dist/INSTALL',
},
{
src: '<%= build %>/kibana/bin/kibana.bat',
dest: '<%= build %>/dist/bin/kibana.bat',
},
{
src: '<%= build %>/kibana/bin/kibana.sh',
dest: '<%= build %>/dist/bin/kibana',

View file

@ -12,12 +12,8 @@ module.exports = function (grunt) {
grunt.log.error(stderr);
return done(err);
}
grunt.log.writeln(stdout);
return done();
});
});
};