From f6439fb29e77505793e123dcbfd9eef62d3975ba Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Fri, 20 Sep 2024 00:31:18 +0500 Subject: Add idea and pycharm run scripts --- pycharm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 pycharm (limited to 'pycharm') diff --git a/pycharm b/pycharm new file mode 100755 index 0000000..b313ed2 --- /dev/null +++ b/pycharm @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -euo pipefail + +main() { + local TOOLBOX_PATH="$HOME/.local/share/JetBrains/Toolbox" + + for edition in pycharm-{ultimate,community}; do + local idea_bin="$TOOLBOX_PATH/apps/$edition/bin/idea.sh" + if [ -x "$idea_bin" ]; then + "$idea_bin" "$@" >/dev/null 2>&1 & + exit 0 + fi + done + + echo "No idea found in toolbox path: $TOOLBOX_PATH" >&2 + exit 1 +} + +main "$@" -- cgit v1.2.3