Team Ai
Modelpublic

Felipe97/llama-cpp-compiled

sourceHugging Faceupdated 21d agoView on Hugging Face
0likes1.2kdownloads
install.sh36 linesDownload Raw Back to git-hooks
1#!/usr/bin/env bash2#3# Install git hooks for llama-ui4# Copies pre-commit and pre-push hooks into the repo's .git/hooks directory.5 6SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"7REPO_ROOT="$(cd "$SCRIPT_DIR/../../../.." && pwd)"8HOOKS_DIR="$REPO_ROOT/$(cd "$REPO_ROOT" && git rev-parse --git-path hooks)"9 10# Verify package.json exists11if [ ! -f "$REPO_ROOT/tools/ui/package.json" ]; then12    echo "❌ package.json not found in tools/ui"13    exit 114fi15 16echo "Installing git hooks for llama-ui..."17 18for hook in pre-commit pre-push; do19    src="$SCRIPT_DIR/${hook}.sh"20    dst="$HOOKS_DIR/$hook"21 22    if cp "$src" "$dst" && chmod +x "$dst"; then23        echo "  ✅ $hook"24    else25        echo "  ❌ Failed to install $hook"26        exit 127    fi28done29 30echo ""31echo "Pre-commit:  format (staged) + type-check"32echo "Pre-push:    lint + test"33echo ""34echo "Hooks stash unstaged changes temporarily and restore them after."35echo "Skip with:  git commit --no-verify / git push --no-verify"36