Skip to content

Commit 7de557b

Browse files
committed
Move script to src/etc
1 parent 44af74f commit 7de557b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/tools/install-git-hook/src/pre-commit.sh renamed to src/etc/pre-commit.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
#!/bin/sh
1+
#!/bin/env bash
22
#
33
# Call `tidy --bless` before each commit
4+
# Copy this scripts to .git/hooks to activate,
5+
# and remove it from .git/hooks to deactivate.
46
#
5-
# To enable this hook, run `./x.py run install-git-hook`.
6-
# To disable it, run `./x.py run install-git-hook --remove`
7+
# For help running bash scripts on Windows,
8+
# see https://stackoverflow.com/a/6413405/6894799
9+
#
10+
711
set -Eeuo pipefail
812

9-
ROOT_DIR=$(git rev-parse --show-toplevel);
13+
ROOT_DIR="$(git rev-parse --show-toplevel)";
1014
COMMAND="$ROOT_DIR/x.py test tidy --bless";
1115

1216
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then

0 commit comments

Comments
 (0)