2018-08-22 15:01:39 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
file="${BASH_SOURCE[0]}"
|
|
|
|
base_dir="$(cd "$(dirname "$file")/" && pwd)"
|
|
|
|
version="$(cat $base_dir/../../build.gradle | sed -n 's/^[ ]*ext\.corda_release_version[ =]*"\([^"]*\)".*$/\1/p')"
|
|
|
|
|
|
|
|
# Build DJVM module and CLI
|
|
|
|
cd "$base_dir/.."
|
|
|
|
../gradlew shadowJar
|
|
|
|
|
|
|
|
# Generate auto-completion file for Bash and ZSH
|
|
|
|
cd "$base_dir"
|
2019-02-21 17:44:46 +00:00
|
|
|
java -cp "$base_dir/../cli/build/libs/corda-djvm-$version-cli.jar" \
|
2018-08-22 15:01:39 +00:00
|
|
|
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
|