aboutsummaryrefslogtreecommitdiffstats
path: root/vespaclient-java
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2022-11-21 11:48:13 +0100
committerTor Brede Vekterli <vekterli@yahooinc.com>2022-11-21 11:48:13 +0100
commit0e73385a1fd007eeed646b620dbfc4d498b68f5f (patch)
tree7466bbc0016b5d26313a3d1650c28adddfc130d7 /vespaclient-java
parent32fdbad465c00e018168a0965f2b5870f2ee1b39 (diff)
Add standalone runner script for vespa-crypto-cli
Useful when the script is run in a context where `VESPA_HOME` is not set. Should work both if the script is invoked directly or through a symbolic link.
Diffstat (limited to 'vespaclient-java')
-rwxr-xr-xvespaclient-java/src/main/sh/vespa-crypto-cli-standalone.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/vespaclient-java/src/main/sh/vespa-crypto-cli-standalone.sh b/vespaclient-java/src/main/sh/vespa-crypto-cli-standalone.sh
new file mode 100755
index 00000000000..15c71c6938b
--- /dev/null
+++ b/vespaclient-java/src/main/sh/vespa-crypto-cli-standalone.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env sh
+# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+# Resolve symlink (if any) and normalize path
+program=$(readlink -f "$0")
+program_dir=$(dirname "$program")
+jarfile=$(readlink -f "$program_dir"/../../../target/vespaclient-java-jar-with-dependencies.jar)
+
+if ! test -e "$jarfile"
+then
+ echo "No such file: '$jarfile'" >&2
+ exit 1
+fi
+
+exec java \
+-Djava.awt.headless=true \
+-Xms128m -Xmx2048m \
+-cp "$jarfile" com.yahoo.vespa.security.tool.Main "$@"