1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#!/usr/bin/env bash
# Make sure we are inside the repository.
cd "${BASH_SOURCE%/*}/.."
# Rebase master by default
git config rebase.stat true
git config branch.master.rebase true
echo "Checking basic user information..."
scripts/gitsetup/setup-user
echo
echo "Setting up git hooks..."
scripts/gitsetup/setup-hooks
echo
echo "Setting up git aliases..."
scripts/setup-git-aliases
echo
echo "Setting up Gerrit..."
scripts/gitsetup/setup-gerrit ||
echo "Failed to setup Gerrit. Run this script again to retry."
echo
setup_version=1
git config hooks.setup ${setup_version}
|