perf: install env checks

This commit is contained in:
2025-12-23 20:53:55 +02:00
parent a286817ce3
commit 891ae505f8
30 changed files with 492 additions and 490 deletions

View File

@@ -6,8 +6,8 @@
#
if ! command -v redis-cli &>/dev/null; then
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
if command -v apt-get >/dev/null 2>&1; 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"
@@ -15,14 +15,17 @@ if ! command -v redis-cli &>/dev/null; then
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
elif command -v pacman >/dev/null 2>&1; then
;;
pacman)
sudo pacman -S --noconfirm redis
else
;;
brew)
brew install redis
;;
*)
log_warn "Skipping Redis install: no supported package manager found"
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
brew install redis
fi
;;
esac
fi
redis-cli --version