From a45bd6e468bd4ff4fe8a2a8ed80e51701cd92b5f Mon Sep 17 00:00:00 2001 From: phalanx-hk Date: Sat, 8 Jun 2024 15:36:21 +0900 Subject: [PATCH] feat: rye --- config/zsh/.zshrc | 1 - install/common/rye.sh | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 install/common/rye.sh diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index 9e1283d..458ea85 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -25,5 +25,4 @@ export GPG_TTY=$(tty) export HISTSIZE=10000 export SAVEHIST=10000 -. "$HOME/.cargo/env" eval "$(gh copilot alias -- zsh)" diff --git a/install/common/rye.sh b/install/common/rye.sh new file mode 100644 index 0000000..0e84de1 --- /dev/null +++ b/install/common/rye.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -Eeuxo pipefail + +readonly RYE_HOME="$HOME/.rye" + +function install_rye() { + curl -sSf https://rye.astral.sh/get | RYE_NO_AUTO_INSTALL=1 RYE_INSTALL_OPTION="--yes" bash +} + +function uninstall_rye() { + rm -rf "${RYE_HOME}" +} + +function main() { + install_rye +} + +if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then + main +fi \ No newline at end of file