1*f50c3066SAndroid Build Coastguard Worker#!/usr/bin/env bash 2*f50c3066SAndroid Build Coastguard Worker 3*f50c3066SAndroid Build Coastguard Worker# stub pre-commit hook 4*f50c3066SAndroid Build Coastguard Worker# just a runner for the real pre-commit script 5*f50c3066SAndroid Build Coastguard Worker# if script cannot be found, exit without error 6*f50c3066SAndroid Build Coastguard Worker# (to not block local commits) 7*f50c3066SAndroid Build Coastguard Worker 8*f50c3066SAndroid Build Coastguard Workerset -e 9*f50c3066SAndroid Build Coastguard Worker 10*f50c3066SAndroid Build Coastguard WorkerREPO_ROOT_DIR="$(git rev-parse --show-toplevel)" 11*f50c3066SAndroid Build Coastguard WorkerPRE_COMMIT_SCRIPT="${REPO_ROOT_DIR}/config/hooks/pre-commit" 12*f50c3066SAndroid Build Coastguard Worker 13*f50c3066SAndroid Build Coastguard Workerif [ -f $PRE_COMMIT_SCRIPT ]; then 14*f50c3066SAndroid Build Coastguard Worker source $PRE_COMMIT_SCRIPT 15*f50c3066SAndroid Build Coastguard Workerfi 16