git-svn-sync/report-error.sh
Mario Fernandez 4c12f4021f Initial commit with the scripts to synchronize git with svn
This contains multiple scripts:
 - A script to synchronize an existing git repository with subversion
   via a git synch client
 - hooks for the git server to trigger the sync after a push
 - a hook for the client to reject every manual change
 - A script to create a new git server repository, along with the git
   synch client, starting from an existing subversion repository.
2012-05-30 11:58:42 +02:00

19 lines
500 B
Bash
Executable file

# -*- mode: Shell-script-*-
#!/usr/bin/bash
#
# Author: Mario Fernandez
#
# Sends an email with the error message obtained from syncing a repository.
destination=${1?No destination provided}
project=${2?No project provided}
message=${3?No message provided}
cat > /tmp/git-sync-failure <<EOF
The project $project could not be correctly synchronized. The output of the script was:
$message
EOF
subject="Git-SVN failed for project $project"
mail -s "$subject" $destination < /tmp/git-sync-failure