Last active
September 10, 2019 08:47
-
-
Save aikar/6488fe89f72125b5d0a20975c7a8e688 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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