Skip to content

Instantly share code, notes, and snippets.

@aikar
Last active September 10, 2019 08:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aikar/6488fe89f72125b5d0a20975c7a8e688 to your computer and use it in GitHub Desktop.
Save aikar/6488fe89f72125b5d0a20975c7a8e688 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ $# -lt 3 ]; then
echo "$0 <app> <channel> <binpath> [*args]"
exit 1
fi
app=$1
channel=$2
binpath=$3
shift
shift
shift
base=~/.local/share/JetBrains/Toolbox/apps/$app
apppath=$base/$channel
ver=$(/bin/ls "$apppath" | tail -n 1)
if [ -z "$ver" ]; then
echo "Can not find $app - $channel"
exit 1
fi
$apppath/$ver/bin/${binpath}.sh "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment