Skip to content

Commit

Permalink
✨ Add install method prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
shroominic committed Dec 26, 2023
1 parent c666b72 commit 20580a0
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions dev-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,42 @@
# check if rye is installed
if ! command -v rye &> /dev/null
then
echo "rye could not be found: installing now ..."
curl -sSf https://rye-up.com/get | bash
echo "Check the rye docs for more info: https://rye-up.com/"
echo "rye could not be found"
echo "Would you like to install via rye or pip? Enter 'rye' or 'pip':"
read install_method
clear

if [ "$install_method" = "rye" ]
then
echo "Installing via rye now ..."
curl -sSf https://rye-up.com/get | bash
echo "Check the rye docs for more info: https://rye-up.com/"

elif [ "$install_method" = "pip" ]
then
echo "Installing via pip now ..."
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.lock

else
echo "Invalid option. Please run the script again and enter 'rye' or 'pip'."
exit 1
fi

clear
fi

echo "SYNC: setup .venv"
rye sync
if [ "$install_method" = "rye" ]
then
echo "SYNC: setup .venv"
rye sync

echo "ACTIVATE: activate .venv"
rye shell

echo "ACTIVATE: activate .venv"
rye shell
clear
fi

echo "SETUP: install pre-commit hooks"
pre-commit install
Expand Down

0 comments on commit 20580a0

Please sign in to comment.