mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-28 06:13:01 +00:00
b34c880f88
Automatically reformats the code before committing any changes using clang-format, to ensure that there are no additional reformatting commits needed in the future. This requires clang-format to be globally available to git, either through path or by directly being in the git bash directory. The hook will only run if a developer actually installs it with install.sh.
8 lines
297 B
Bash
8 lines
297 B
Bash
#!/bin/bash
|
|
|
|
readarray -t hooks < <(find .hooks/ -maxdepth 1 -type d -not -wholename .hooks/ -print0)
|
|
for v in "${hooks[@]}"; do
|
|
hookname=`basename $v`
|
|
echo "#!/bin/bash" > .git/hooks/${hookname}
|
|
echo "find .hooks/${hookname}/ -type f -name '*.sh' -exec '{}' \;" >> .git/hooks/${hookname}
|
|
done
|