34 lines
843 B
Bash
Executable File
34 lines
843 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# system dependencies
|
|
sudo apt update
|
|
sudo apt install -y git
|
|
|
|
# Install just if not found
|
|
if ! command -v just &> /dev/null
|
|
then
|
|
echo "just not found, installing..."
|
|
sudo apt install -y just
|
|
else
|
|
echo "just is already installed."
|
|
fi
|
|
|
|
# Install rye if not found
|
|
if ! command -v rye &> /dev/null
|
|
then
|
|
echo "rye not found, installing..."
|
|
# The official rye installation script
|
|
curl -sSf https://rye.astral.sh/get | bash
|
|
# Source rye's env to make it available in the current shell for this script
|
|
source "$HOME/.rye/env"
|
|
else
|
|
echo "rye is already installed."
|
|
# Ensure rye's env is sourced if it's already installed but not in PATH
|
|
if ! command -v rye &> /dev/null
|
|
then
|
|
source "$HOME/.rye/env"
|
|
fi
|
|
fi
|
|
|
|
# rye setup will manage python version and dependencies
|
|
rye sync |