diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2020-04-30 09:38:05 +0200 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2020-04-30 09:38:25 +0200 |
commit | 2381c52c690342f773a7cfa500387b6bfad76952 (patch) | |
tree | 340296ea529e40b81012c936703429a86481788e /git-hooks/loader.sh | |
parent | 2d26169b367af60cbc03d417c09918f50aa3b882 (diff) | |
download | ste-2381c52c690342f773a7cfa500387b6bfad76952.tar.gz ste-2381c52c690342f773a7cfa500387b6bfad76952.tar.bz2 ste-2381c52c690342f773a7cfa500387b6bfad76952.zip |
Automatic code formatting
Also add git hooks that checks formatting
Diffstat (limited to 'git-hooks/loader.sh')
-rwxr-xr-x | git-hooks/loader.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/git-hooks/loader.sh b/git-hooks/loader.sh new file mode 100755 index 0000000..eadafa6 --- /dev/null +++ b/git-hooks/loader.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +hook="$1" +shift + +gitdir="$(git rev-parse --git-dir)" +[ -x "$gitdir/hooks/own_$hook" ] && "$gitdir/hooks/own_$hook" "$@" +[ -x "$gitdir/../git-hooks/hooks/$hook" ] && "$gitdir/../git-hooks/hooks/$hook" "$@" |