From 0fa961e518cc6a2b1b3ce9eae235c0b6aacaffb7 Mon Sep 17 00:00:00 2001 From: OMAR BOUYKOURNE Date: Wed, 11 May 2022 11:16:16 +0100 Subject: [PATCH] fix: removed litteral \n in echo and refactor some guide --- my_tools_installer.bash | 2 +- scripts/nvm_installer.bash | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/my_tools_installer.bash b/my_tools_installer.bash index e5409d8..e8e79be 100755 --- a/my_tools_installer.bash +++ b/my_tools_installer.bash @@ -92,7 +92,7 @@ cleanup() { shell_f="${HOME}/.${SHELL_LANG}rc" brew &>/dev/null if [[ "$?" == "127" ]]; then - echo -e "\n\033[32m ⛔️ You need to update the PATH variable with this command: [ source $shell_f ]\033[0m\n" + echo -e "\n\033[32m ⛔️ Please, run this command: [ source $shell_f ]\033[0m\n" exit 1 fi exit 0 diff --git a/scripts/nvm_installer.bash b/scripts/nvm_installer.bash index 7465ea5..75a96ef 100755 --- a/scripts/nvm_installer.bash +++ b/scripts/nvm_installer.bash @@ -80,7 +80,8 @@ mkdir "$HOME"/goinfre/.nvm &>/dev/null ln -s "$HOME"/goinfre/.nvm "$HOME"/.nvm &>/dev/null # add the nvm config the shell config file -echo "\n# nvm configuration\n" >>"$shell_f" +echo >> "$shell_f" +echo "# nvm configuration" >>"$shell_f" echo 'export NVM_DIR=$HOME/.nvm' >> "$shell_f" echo '[ -s "$HOME/goinfre/.brew/opt/nvm/nvm.sh" ] && \. "$HOME/goinfre/.brew/opt/nvm/nvm.sh" # This loads nvm' >> "$shell_f" echo '[ -s "$HOME/goinfre/.brew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "$HOME/goinfre/.brew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion' >> "$shell_f" @@ -100,6 +101,6 @@ fi # tell the user to source the shell config file -echo -e "\n\033[32m ⛔️ You need to update the PATH variable with this command: [ source $shell_f ]\033[0m\n" +echo -e "\n\033[32m ⛔️ Please, run this command: [ source $shell_f ]\033[0m\n" echo -e "\n\033[33m You can install any node version you want with [ nvm install version_number ] \033[0m" echo -e "\n\033[33m ex: nvm install 17 \033[0m" \ No newline at end of file