UNPKG

worktree-tool

Version:

A command-line tool for managing Git worktrees with integrated tmux/shell session management

14 lines (12 loc) 535 B
import { readFileSync, writeFileSync } from 'fs'; import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; const __dirname = dirname(fileURLToPath(import.meta.url)); const indexPath = join(__dirname, '../dist/index.js'); const content = readFileSync(indexPath, 'utf8'); if (!content.startsWith('#!/usr/bin/env node')) { writeFileSync(indexPath, '#!/usr/bin/env node\n' + content); console.log('✓ Shebang added to dist/index.js'); } else { console.log('✓ Shebang already present in dist/index.js'); }