Created
January 18, 2023 18:47
-
-
Save kota65535/94bf7ffbc2d8a660c8e5abf625fa23d1 to your computer and use it in GitHub Desktop.
Self-install pre-commit hook script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
# Install pre-commit hook | |
if [[ $0 != ".git/hooks/pre-commit" ]]; then | |
cp "$0" .git/hooks/pre-commit | |
fi | |
# Do something ... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment