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
- repo: local | |
hooks: | |
- id: yaml-file-extension | |
name: Prefer .yaml over .yml. | |
entry: YAML files must have .yaml extension. | |
language: fail | |
files: \.yml$ |
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
#!/bin/bash | |
if (($EUID != 0)); then | |
if [[ -t 1 ]]; then | |
sudo "$0" "$@" | |
else | |
exec 1>output_file | |
gksu "$0 $@" | |
fi | |
exit |