From b770440210bc90a0055df838f2e592171e0e45b2 Mon Sep 17 00:00:00 2001 From: Todd Underwood Date: Tue, 28 Nov 2023 11:56:14 -0800 Subject: [PATCH 1/2] chore: add profile source commands --- get-armory-cli | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/get-armory-cli b/get-armory-cli index ee1a797..a7bfc6b 100755 --- a/get-armory-cli +++ b/get-armory-cli @@ -109,6 +109,8 @@ if [[ $OS == 'darwin' ]]; then if [[ -z $(grep "export PATH=\"\${PATH}:${HOME}/.avm/bin" "$avm_bash_profile") ]]; then echo -e "$PATH_SNIPPIT" >> "$avm_bash_profile" echo "Added ${HOME}/.avm/bin to path in $avm_bash_profile" + echo "Please close and restart your terminal to use the Armory CLI or run the following to use it now:" + echo "source $avm_bash_profile" fi else echo "Attempt update of interactive bash profile on regular UNIX..." @@ -116,6 +118,8 @@ else if [[ -z $(grep "export PATH=\"\${PATH}:${HOME}/.avm/bin" "$avm_bashrc") ]]; then echo -e "$PATH_SNIPPIT" >> "$avm_bashrc" echo "Added ${HOME}/.avm/bin to path in $avm_bashrc" + echo "Please close and restart your terminal to use the Armory CLI or run the following to use it now:" + echo "source $avm_bashrc" fi fi @@ -124,11 +128,19 @@ touch "$avm_zshrc" if [[ -z $(grep "export PATH=\"\${PATH}:${HOME}/.avm/bin" "$avm_zshrc") ]]; then echo -e "$PATH_SNIPPIT" >> "$avm_zshrc" echo "Added ${HOME}/.avm/bin to path in ${avm_zshrc}" + echo "Please close and restart your terminal to use the Armory CLI or run the following to use it now:" + echo "source $avm_zshrc" fi echo "############################################################################################" echo "# Install of avm and armory complete" echo "# This install script updates your bash or zsh profile to add ${HOME}/.avm/bin to your path" echo "# If you aren't using bash or zsh you will need to do this manually" -echo "# You may have to start a new terminal session or re-source your bash or zsh profile/rc" +echo "#" +echo "# Please close and restart the terminal to use the Armory CLI or run the following to use it now:" +if [[ $OS == 'darwin' ]]; then + echo "# source $avm_bash_profile && source $avm_zshrc" +else + echo "# source $avm_bashrc && source $avm_zshrc" +fi echo "############################################################################################" From 1969249bfe877eafdb946c23607e312cef1ed293 Mon Sep 17 00:00:00 2001 From: Todd Underwood Date: Tue, 28 Nov 2023 11:57:17 -0800 Subject: [PATCH 2/2] chore: remove extra echos --- get-armory-cli | 6 ------ 1 file changed, 6 deletions(-) diff --git a/get-armory-cli b/get-armory-cli index a7bfc6b..fa19cd1 100755 --- a/get-armory-cli +++ b/get-armory-cli @@ -109,8 +109,6 @@ if [[ $OS == 'darwin' ]]; then if [[ -z $(grep "export PATH=\"\${PATH}:${HOME}/.avm/bin" "$avm_bash_profile") ]]; then echo -e "$PATH_SNIPPIT" >> "$avm_bash_profile" echo "Added ${HOME}/.avm/bin to path in $avm_bash_profile" - echo "Please close and restart your terminal to use the Armory CLI or run the following to use it now:" - echo "source $avm_bash_profile" fi else echo "Attempt update of interactive bash profile on regular UNIX..." @@ -118,8 +116,6 @@ else if [[ -z $(grep "export PATH=\"\${PATH}:${HOME}/.avm/bin" "$avm_bashrc") ]]; then echo -e "$PATH_SNIPPIT" >> "$avm_bashrc" echo "Added ${HOME}/.avm/bin to path in $avm_bashrc" - echo "Please close and restart your terminal to use the Armory CLI or run the following to use it now:" - echo "source $avm_bashrc" fi fi @@ -128,8 +124,6 @@ touch "$avm_zshrc" if [[ -z $(grep "export PATH=\"\${PATH}:${HOME}/.avm/bin" "$avm_zshrc") ]]; then echo -e "$PATH_SNIPPIT" >> "$avm_zshrc" echo "Added ${HOME}/.avm/bin to path in ${avm_zshrc}" - echo "Please close and restart your terminal to use the Armory CLI or run the following to use it now:" - echo "source $avm_zshrc" fi echo "############################################################################################"