about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/office/atlassian-cli/wrapper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/office/atlassian-cli/wrapper.sh')
-rwxr-xr-xnixpkgs/pkgs/applications/office/atlassian-cli/wrapper.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/office/atlassian-cli/wrapper.sh b/nixpkgs/pkgs/applications/office/atlassian-cli/wrapper.sh
new file mode 100755
index 000000000000..80b60dbc468c
--- /dev/null
+++ b/nixpkgs/pkgs/applications/office/atlassian-cli/wrapper.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+tool=@tool@
+user=ATLASSIAN_${tool^^}_USER
+host=ATLASSIAN_${tool^^}_HOST
+pass=ATLASSIAN_${tool^^}_PASS
+
+[ -f ~/.atlassian-cli ] && source ~/.atlassian-cli
+if [ x = ${!user-x} ] || [ x = ${!host-x} ] || [ x = ${!pass-x} ]
+then
+    >&2 echo please define $user, $host, and $pass in '~/.atlassian-cli'
+    exit 1
+fi
+
+@jre@/bin/java \
+    -jar @out@/share/java/@tool@-cli-* \
+    --server "${!host}" \
+    --user "${!user}" \
+    --password "${!pass}" \
+    "$@"