Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Commit 9a42d52

Browse files
authored
Merge pull request #94 from jetstack/fix_typo_install_script
Fix wrong shell profile in install script message
2 parents 39490d6 + 9253378 commit 9a42d52

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

install.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,17 @@ echo "jsctl was installed successfully to $bin"
6565
if command -v jsctl >/dev/null; then
6666
echo "Run 'jsctl --help' to get started"
6767
else
68-
case $SHELL in
69-
/bin/zsh) shell_profile=".zshrc" ;;
70-
*) shell_profile=".bashrc" ;;
71-
esac
68+
if [ "$SHELL" = "/bin/zsh" ] || [ "$ZSH_NAME" = "zsh" ]; then
69+
shell_profile=".zshrc"
70+
else
71+
shell_profile=".bashrc"
72+
fi
7273
echo
7374
echo "Manually add the directory to your \$HOME/$shell_profile (or similar)"
7475
echo " export JSCTL_INSTALL=\"$jsctl_install\""
7576
echo " export PATH=\"\$JSCTL_INSTALL/bin:\$PATH\""
7677
echo
77-
echo "And run \"source $HOME/.bashrc\" to update your current shell"
78+
echo "And run \"source $HOME/$shell_profile\" to update your current shell"
7879
echo
7980
echo "Run '$bin --help' to get started"
8081
fi

0 commit comments

Comments
 (0)