git/gitk-git/generate-tcl.sh
Junio C Hamano b838bf1938 Merge branch 'master' of https://github.com/j6t/gitk
* 'master' of https://github.com/j6t/gitk:
  gitk: introduce support for the Meson build system
  gitk: extract script to build executable
  gitk: make the "list references" default window width wider
  gitk: fix arrow keys in input fields with Tcl/Tk >= 8.6
  gitk: Use an external icon file on Windows
  gitk: Unicode file name support
  gitk(Windows): avoid inadvertently calling executables in the worktree
2025-02-20 05:59:56 -08:00

12 lines
196 B
Bash
Executable File

#!/bin/sh
set -e
WISH=$(echo "$1" | sed 's/|/\\|/g')
INPUT="$2"
OUTPUT="$3"
sed -e "1,3s|^exec .* \"\$0\"|exec $WISH \"\$0\"|" "$INPUT" >"$OUTPUT"+
chmod a+x "$OUTPUT"+
mv "$OUTPUT"+ "$OUTPUT"