JetBrains Toolbox fails to update it's CLI scripts from time to time, and even if it does - they don't work as expected.
This is my ugly attempt to fix this on OSX.
#!/bin/bash | |
jbtb-open CLion ch-0 "${@}" |
#!/bin/bash | |
jbtb-open datagrip ch-0 "${@}" |
#!/bin/bash | |
jbtb-open Goland ch-0 "${@}" |
#!/bin/bash | |
if [[ -z "${2}" ]]; then | |
echo "usage: ${0} <app> <channel> [args]" >&2 | |
exit 1 | |
fi | |
app="${1}"; shift | |
channel="${1}"; shift | |
dir="${HOME}/Library/Application Support/JetBrains/Toolbox/apps/${app}/${channel}" | |
ver=$(find "${dir}" -type d -maxdepth 1 | tail -1) | |
if [[ -z "${ver}" ]]; then | |
echo "${0}: no versions of ${app} in ${channel} installed" >&2 | |
exit 1 | |
fi | |
open -a "${ver}/${app}.app" "${@}" |
#!/bin/bash | |
jbtb-open RubyMine ch-0 "${@}" |