depot/third_party/nixpkgs/pkgs/applications/office/atlassian-cli/wrapper.sh
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

20 lines
471 B
Bash
Executable file

#!/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}" \
"$@"