From b64933ac862d0b477b296841bc87e9697f1e2f0d Mon Sep 17 00:00:00 2001 From: Alexander Stolz Date: Tue, 15 Oct 2024 11:27:35 +0200 Subject: [PATCH 1/3] The alias is pointing to source command, which seems wrong. It should point to the ide application --- cli/src/main/package/setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/main/package/setup b/cli/src/main/package/setup index 1c75d998a4..b78ec1088b 100755 --- a/cli/src/main/package/setup +++ b/cli/src/main/package/setup @@ -9,7 +9,7 @@ if ! grep -q "${AUTOCOMPLETION}" ~/.bashrc; then echo -e "${AUTOCOMPLETION}" >> ~/.bashrc fi if ! grep -q "alias ide=" ~/.bashrc; then - echo -e "alias ide=\"source ${PWD}/bin/ide\"" >> ~/.bashrc + echo -e "alias ide=\"${PWD}/bin/ide\"" >> ~/.bashrc echo -e "ide" >> ~/.bashrc fi @@ -27,7 +27,7 @@ if [ -f ~/.zshrc ]; then echo -e "${AUTOCOMPLETION}" >> ~/.zshrc fi if ! grep -q "alias ide=" ~/.zshrc; then - echo -e "alias ide=\"source ${PWD}/bin/ide\"" >> ~/.zshrc + echo -e "alias ide=\"${PWD}/bin/ide\"" >> ~/.zshrc echo -e "ide" >> ~/.zshrc fi fi From bccd19f838d162577f63d8c0c1ae403c10b961d2 Mon Sep 17 00:00:00 2001 From: blizzarac Date: Tue, 15 Oct 2024 16:51:12 +0200 Subject: [PATCH 2/3] IDE_ROOT missing in rc setup --- cli/src/main/package/setup | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cli/src/main/package/setup b/cli/src/main/package/setup index b78ec1088b..97de9d9a72 100755 --- a/cli/src/main/package/setup +++ b/cli/src/main/package/setup @@ -13,6 +13,16 @@ if ! grep -q "alias ide=" ~/.bashrc; then echo -e "ide" >> ~/.bashrc fi +if ! grep -q "IDE_ROOT" ~/.bashrc +then + echo -e 'export IDE_ROOT="$(pwd)"' >> ~/.bashrc +fi + +if ! grep -q "IDE_ROOT" ~/.zshrc +then + echo -e 'export IDE_ROOT="$(pwd)"' >> ~/.zshrc +fi + if [ -f ~/.zshrc ]; then if ! grep -q "compinit" ~/.zshrc then From 942ecc64cf357d7fe5a52a1b00109a9e4e60dcd5 Mon Sep 17 00:00:00 2001 From: blizzarac Date: Sun, 27 Oct 2024 11:41:16 +0100 Subject: [PATCH 3/3] Reverting source removal and adding OS check for IDE_ROOT --- cli/src/main/package/setup | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/cli/src/main/package/setup b/cli/src/main/package/setup index 97de9d9a72..f22c797c4e 100755 --- a/cli/src/main/package/setup +++ b/cli/src/main/package/setup @@ -9,20 +9,23 @@ if ! grep -q "${AUTOCOMPLETION}" ~/.bashrc; then echo -e "${AUTOCOMPLETION}" >> ~/.bashrc fi if ! grep -q "alias ide=" ~/.bashrc; then - echo -e "alias ide=\"${PWD}/bin/ide\"" >> ~/.bashrc + echo -e "alias ide=\"source ${PWD}/bin/ide\"" >> ~/.bashrc echo -e "ide" >> ~/.bashrc fi -if ! grep -q "IDE_ROOT" ~/.bashrc -then - echo -e 'export IDE_ROOT="$(pwd)"' >> ~/.bashrc -fi +if [ "${OSTYPE}" != "cygwin" ] && [ "${OSTYPE}" != "msys" ]; then + if ! grep -q "IDE_ROOT" ~/.bashrc + then + echo -e 'export IDE_ROOT="$(pwd)"' >> ~/.bashrc + fi -if ! grep -q "IDE_ROOT" ~/.zshrc -then - echo -e 'export IDE_ROOT="$(pwd)"' >> ~/.zshrc + if ! grep -q "IDE_ROOT" ~/.zshrc + then + echo -e 'export IDE_ROOT="$(pwd)"' >> ~/.zshrc + fi fi + if [ -f ~/.zshrc ]; then if ! grep -q "compinit" ~/.zshrc then @@ -37,7 +40,7 @@ if [ -f ~/.zshrc ]; then echo -e "${AUTOCOMPLETION}" >> ~/.zshrc fi if ! grep -q "alias ide=" ~/.zshrc; then - echo -e "alias ide=\"${PWD}/bin/ide\"" >> ~/.zshrc + echo -e "alias ide=\"source ${PWD}/bin/ide\"" >> ~/.zshrc echo -e "ide" >> ~/.zshrc fi fi