From bec18c40a2b6a730d380b5919590eacb7c734750 Mon Sep 17 00:00:00 2001 From: sveitser Date: Fri, 20 Mar 2026 14:17:09 +0100 Subject: [PATCH] fix: use /usr/bin/env shebangs for portability across systems --- .claude/hooks/bash/pre-commit-format.sh | 2 +- .claude/hooks/rtk-rewrite.sh | 2 +- .claude/hooks/rtk-suggest.sh | 2 +- hooks/claude/test-rtk-rewrite.sh | 2 +- install.sh | 2 +- scripts/benchmark.sh | 2 +- scripts/check-installation.sh | 2 +- scripts/install-local.sh | 2 +- scripts/rtk-economics.sh | 2 +- scripts/update-readme-metrics.sh | 2 +- scripts/validate-docs.sh | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.claude/hooks/bash/pre-commit-format.sh b/.claude/hooks/bash/pre-commit-format.sh index 08fe7267b..422beab31 100755 --- a/.claude/hooks/bash/pre-commit-format.sh +++ b/.claude/hooks/bash/pre-commit-format.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Auto-format Rust code before commits # Hook: PreToolUse for git commit diff --git a/.claude/hooks/rtk-rewrite.sh b/.claude/hooks/rtk-rewrite.sh index 6e7524d89..3ec14e0a7 100755 --- a/.claude/hooks/rtk-rewrite.sh +++ b/.claude/hooks/rtk-rewrite.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # rtk-hook-version: 3 # RTK auto-rewrite hook for Claude Code PreToolUse:Bash # Transparently rewrites raw commands to their RTK equivalents. diff --git a/.claude/hooks/rtk-suggest.sh b/.claude/hooks/rtk-suggest.sh index b35b47d80..34fb50f3b 100755 --- a/.claude/hooks/rtk-suggest.sh +++ b/.claude/hooks/rtk-suggest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # RTK suggest hook for Claude Code PreToolUse:Bash # Emits system reminders when rtk-compatible commands are detected. # Outputs JSON with systemMessage to inform Claude Code without modifying execution. diff --git a/hooks/claude/test-rtk-rewrite.sh b/hooks/claude/test-rtk-rewrite.sh index 502023c03..85103163b 100644 --- a/hooks/claude/test-rtk-rewrite.sh +++ b/hooks/claude/test-rtk-rewrite.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Test suite for rtk-rewrite.sh # Feeds mock JSON through the hook and verifies the rewritten commands. # diff --git a/install.sh b/install.sh index 4fd0b4e12..1654245d9 100644 --- a/install.sh +++ b/install.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # rtk installer - https://github.com/rtk-ai/rtk # Usage: curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh diff --git a/scripts/benchmark.sh b/scripts/benchmark.sh index cdb0ecf19..a1e616bcc 100755 --- a/scripts/benchmark.sh +++ b/scripts/benchmark.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e # Use local release build if available, otherwise fall back to installed rtk diff --git a/scripts/check-installation.sh b/scripts/check-installation.sh index 023ff4df8..e7a56fb7a 100755 --- a/scripts/check-installation.sh +++ b/scripts/check-installation.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # RTK Installation Verification Script # Helps diagnose if you have the correct rtk (Token Killer) installed diff --git a/scripts/install-local.sh b/scripts/install-local.sh index 59da1abfd..c529e329d 100755 --- a/scripts/install-local.sh +++ b/scripts/install-local.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Install RTK from a local release build (builds from source, no network download). set -euo pipefail diff --git a/scripts/rtk-economics.sh b/scripts/rtk-economics.sh index bbe6f4911..01aa3b1a5 100755 --- a/scripts/rtk-economics.sh +++ b/scripts/rtk-economics.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # rtk-economics.sh # Combine ccusage (tokens spent) with rtk (tokens saved) for economic analysis diff --git a/scripts/update-readme-metrics.sh b/scripts/update-readme-metrics.sh index 5831f26c1..7e6293efe 100755 --- a/scripts/update-readme-metrics.sh +++ b/scripts/update-readme-metrics.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e REPORT="benchmark-report.md" diff --git a/scripts/validate-docs.sh b/scripts/validate-docs.sh index a8985557b..508f40a71 100755 --- a/scripts/validate-docs.sh +++ b/scripts/validate-docs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e echo "🔍 Validating RTK documentation consistency..."