This commit is contained in:
2026-01-28 19:00:34 +00:00
parent e6f51d69b6
commit b018877c03

View File

@@ -4,7 +4,6 @@ set -e
BINARY_NAME="crib"
GITHUB_URL="https://github.com/SyedM-dev/crib/releases/download/v0.0.1-alpha/crib-linux-x86_64"
# 1⃣ Check dependencies
missing=()
command -v ruby >/dev/null 2>&1 || missing+=("ruby")
ldconfig -p | grep libmagic >/dev/null 2>&1 || missing+=("libmagic")
@@ -18,7 +17,6 @@ if [ ${#missing[@]} -ne 0 ]; then
exit 1
fi
# 2⃣ Ask installation path
echo "Install locally (~/.local/bin) or globally (/usr/bin)? [l/g]"
read -r choice
case "$choice" in
@@ -32,12 +30,10 @@ esac
mkdir -p "$INSTALL_DIR"
# 3⃣ Download the binary
echo "Downloading binary..."
curl -L "$GITHUB_URL" -o "$INSTALL_DIR/$BINARY_NAME"
chmod +x "$INSTALL_DIR/$BINARY_NAME"
# 4⃣ Optional: confirm
echo "$BINARY_NAME installed to $INSTALL_DIR"
echo "You can run it with: $BINARY_NAME"
echo "Remember to add $INSTALL_DIR to PATH if not already."