LiteLoaderBDS-1.16.40/Tools/ScriptX/.devtools/install.sh
2023-03-03 10:18:21 -08:00

24 lines
446 B
Bash

#!/bin/sh
set -e
cd "$(git rev-parse --show-toplevel)"
DEVTOOLS=.devtools
chmod a+x ${DEVTOOLS}/*.sh
cp ${DEVTOOLS}/hooks/pre-commit .git/hooks/
chmod a+x .git/hooks/pre-commit
if ! command -v clang-format >/dev/null 2>&1; then
cat >&2 <<EOF
clang-format not fond, git commit would fail.
please install clang-format.
mac -> brew install clang-format
windows -> http://llvm.org/builds/
ubuntu -> sudo apt install clang-format
EOF
fi