diff --git a/tools/repo/check.d/all-tools-executable.sh b/tools/repo/check.d/all-tools-executable.sh new file mode 100755 index 0000000..88b47e0 --- /dev/null +++ b/tools/repo/check.d/all-tools-executable.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +for s in $(find tools/ -type f -iname "*.sh"); do + if ! [ -x $s ]; then + echo "$s is not executable" + exit 1 + fi +done diff --git a/tools/repo/install-git-hooks.sh b/tools/repo/install-git-hooks.sh new file mode 100755 index 0000000..03d8d95 --- /dev/null +++ b/tools/repo/install-git-hooks.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +[ -d ".git/hooks" ] || mkdir .git/hooks +ln tools/repo/check.sh .git/hooks/pre-commit \ No newline at end of file