Skip to content

Commit

Permalink
feat: support multiple shells in the setup script (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
rachwalk authored Sep 11, 2024
1 parent 3d3b7fa commit 5e8360f
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion setup_shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,27 @@

# Suppress ShellCheck warning about not following external file
# shellcheck disable=SC1091
. install/setup.bash

case "$SHELL" in
*bash)
. install/setup.bash
echo "Sourced bash install"
;;
*zsh)
. install/setup.zsh
echo "Sourced zsh install"
;;
*fish)
echo "fish is not supported"
;;
*sh)
. install/setup.sh
echo "Sourced sh install."
;;
*)
echo "Unknown shell: $0"
;;
esac

export PYTHONPATH
PYTHONPATH="$(dirname "$(dirname "$(poetry run which python)")")/lib/python$(poetry run python --version | awk '{print $2}' | cut -d. -f1,2)/site-packages:$PYTHONPATH"

0 comments on commit 5e8360f

Please sign in to comment.