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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
#!/usr/bin/env bash
# Run this script to set up development with git.
die() {
echo 'Failure during git development setup' 1>&2
echo '------------------------------------' 1>&2
echo '' 1>&2
echo "$@" 1>&2
exit 1
}
# Make sure we are inside the repository.
cd "$(echo "$0"|sed 's/[^/]*$//')"/..
if test -d .git/.git; then
die "The directory '.git/.git' exists, indicating a configuration error.
Please 'rm -rf' this directory."
fi
echo "Configuring push urls..."
git config remote.origin.pushurl git@vtk.org:VTK.git
# Rebase master by default
git config rebase.stat true
git config branch.master.rebase true
cd Utilities/Scripts
echo "Checking basic user information..."
./SetupUser.sh || exit 1
echo
echo "Setting up git hooks..."
./SetupHooks.sh || exit 1
echo
echo "Setting up the topic stage..."
./SetupTopicStage.sh || exit 1
echo
echo "Setting up git aliases..."
./SetupGitAliases.sh || exit 1
echo
echo "Setting up Gerrit..."
./SetupGerrit.sh || exit 1
echo
echo "Suggesting git tips..."
./GitTips.sh || exit 1
echo
|