Bash-wrapper-functions: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 8: Line 8:


Functionality:
Functionality:
* Basic error/warn/debug functionality.
* Build a classpath based on the JAR content of a repository.
* Build a classpath based on the JAR content of a repository.
* Get the Java binary based on a combination of command line options, the content of the JAVA_HOME environment variable, and the "java" binary available in path.
* Get the Java binary based on a combination of command line options, the content of the JAVA_HOME environment variable, and the "java" binary available in path.

Revision as of 23:41, 21 July 2017

Internal

Overview

A project that offers common bash wrapper functionality in form of a single function file to be sourced in the main wrapper, and a main wrapper template ("application-shell-wrapper-template")

Functionality:

  • Basic error/warn/debug functionality.
  • Build a classpath based on the JAR content of a repository.
  • Get the Java binary based on a combination of command line options, the content of the JAVA_HOME environment variable, and the "java" binary available in path.
  • "Light" version reporting functionality, which relies on the presence of the lib/VERSION file.

GitHub

https://github.com/NovaOrdis/bash-wrapper-functions

Usage

Copy bash-wrapper-functions in the bin directory and refer it as following:

 [ -f $(dirname $0)/bash-wrapper-functions ] && .  $(dirname $0)/bash-wrapper-functions || { echo "$(dirname $0)/bash-wrapper-functions not found" 1>&2; exit 1; }