-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·36 lines (30 loc) · 1.04 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·36 lines (30 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
set -euo pipefail
# Luthien Internal Utils — one-liner installer
# bash <(curl -fsSL https://raw.githubusercontent.com/LuthienResearch/internal-utils/main/install.sh)
if command -v npx &>/dev/null; then
exec npx luthien-internal-utils "$@"
fi
echo "npx not found. Installing Node.js..."
if command -v apt-get &>/dev/null; then
echo "Installing via apt..."
sudo apt-get update -qq && sudo apt-get install -y -qq nodejs npm
elif command -v brew &>/dev/null; then
echo "Installing via Homebrew..."
brew install node
elif command -v dnf &>/dev/null; then
echo "Installing via dnf..."
sudo dnf install -y nodejs npm
elif command -v pacman &>/dev/null; then
echo "Installing via pacman..."
sudo pacman -S --noconfirm nodejs npm
else
echo "Could not auto-install Node.js. Please install it manually:"
echo " https://nodejs.org/en/download"
exit 1
fi
if ! command -v npx &>/dev/null; then
echo "npx still not found after installing Node.js. Please check your installation."
exit 1
fi
exec npx luthien-internal-utils "$@"