mirror of
https://github.com/corda/corda.git
synced 2025-02-11 21:26:23 +00:00
* 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.
18 lines
565 B
Bash
Executable File
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
|