feat: install script re-org

This commit is contained in:
2026-02-13 15:13:12 +00:00
parent faf3bf2dfc
commit eb958a36e0
26 changed files with 5 additions and 3 deletions

35
install.d/50-redis.sh Executable file
View File

@@ -0,0 +1,35 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Install Redis.
#
# Skip in Codespaces (project-specific tool)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_skip "Codespaces"; return 0; }
if ! command -v redis-cli &>/dev/null; then
case "$DOTS_PKG" in
apt)
redis_keyring_path="/usr/share/keyrings/redis-archive-keyring.gpg"
if [[ ! -f "$redis_keyring_path" ]]; then
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o "$redis_keyring_path"
fi
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" \
| sudo tee /etc/apt/sources.list.d/redis.list > /dev/null
sudo apt-get install -qq redis
;;
pacman)
sudo pacman -S --noconfirm redis
;;
brew)
brew install redis
;;
*)
log_warn "Skipping Redis install: no supported package manager found"
;;
esac
fi
redis-cli --version
log_pass "Redis installed"