run-hook.cmd 493 B

12345678910111213141516171819
  1. : << 'CMDBLOCK'
  2. @echo off
  3. REM Polyglot wrapper: runs .sh scripts cross-platform
  4. REM Usage: run-hook.cmd <script-name> [args...]
  5. REM The script should be in the same directory as this wrapper
  6. if "%~1"=="" (
  7. echo run-hook.cmd: missing script name >&2
  8. exit /b 1
  9. )
  10. "C:\Program Files\Git\bin\bash.exe" -l "%~dp0%~1" %2 %3 %4 %5 %6 %7 %8 %9
  11. exit /b
  12. CMDBLOCK
  13. # Unix shell runs from here
  14. SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
  15. SCRIPT_NAME="$1"
  16. shift
  17. "${SCRIPT_DIR}/${SCRIPT_NAME}" "$@"