corda/djvm/shell/install
Chris Rankin ec5cbc2971 CORDA-2721: Update djvm check documentation, and fix CLI tool installation. (#4865)
* CORDA-2721: Fix DJVM CLI installation and runtime scripts.

* Update DJVM documentation to explain about `RuleViolationError`.

* CORDA-2721: Add comment about constants.properties being parsed by DJVM CLI scripts.
2019-03-09 18:27:45 +00:00

18 lines
565 B
Bash
Executable File

#!/usr/bin/env bash
file="${BASH_SOURCE[0]}"
base_dir="$(cd "$(dirname "$file")/" && pwd)"
version="$(cat $base_dir/../../constants.properties | sed -n 's/^[ ]*cordaVersion[ =]*\(.*\).*$/\1/p')"
# Build DJVM module and CLI
cd "$base_dir/.."
../gradlew shadowJar
# Generate auto-completion file for Bash and ZSH
cd "$base_dir"
java -cp "$base_dir/../cli/build/libs/corda-djvm-$version-cli.jar" \
picocli.AutoComplete -n djvm net.corda.djvm.tools.cli.Commands -f
# Create a symbolic link to the `djvm` utility
sudo ln -sf "$base_dir/djvm" /usr/local/bin/djvm