Skip to content

Commit

Permalink
Add shell source instruction on completion
Browse files Browse the repository at this point in the history
  • Loading branch information
DelevoXDG committed Jan 13, 2025
1 parent 79123fe commit f298591
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion starknetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,27 @@ main() {
install_latest_version "starknet-foundry"
set_global_latest_version "starknet-foundry"

say "Installation complete"
local shell_config completion_message

case ${SHELL:-""} in
*/zsh)
shell_config="$HOME/.zshrc"
completion_message="Run 'source ${shell_config}'"
;;
*/bash)
if [ "$(uname)" = "Darwin" ]; then
shell_config="$HOME/.bash_profile"
else
shell_config="$HOME/.bashrc"
fi
completion_message="Run 'source ${shell_config}'"
;;
*)
completion_message="Source your shell configuration file"
;;
esac

say "Installation complete. ${completion_message} or start a new terminal session to use the installed tools."
}

assert_dependencies() {
Expand Down

0 comments on commit f298591

Please sign in to comment.