1
1
openmpi/contrib/infrastructure/openmpi-update-hg-svn.sh
Jeff Squyres 0a348ac2e2 Oops -- the last commit moved the "update www.open-mpi.org" script
(i.e., the script that fires via cron every 15 mins to "git pull" from
the github ompi-www repo).

This commit moves the mercurial mirroring script to the
"infrastructure" directory.

This commit was SVN r31360.
2014-04-09 14:30:16 +00:00

40 строки
922 B
Bash
Исполняемый файл

#!/bin/sh -f
#
# This script keeps the mercurial bitbucket repo in sync with the
# upstream OMPI SVN repository.
#
# This script runs on www.open-mpi.org under the mpiteam user.
# It is located in /home/ompi-hg/update-hg-svn.sh, and is fired
# via the following mpiteam crontab entry:
#
# 10,25,40,55 * * * * /home/ompi-hg/update-hg-svn.sh
#
logfile=/tmp/ompi-hg-cron-$$
. /etc/profile.d/modules.sh
module unload mercurial
module load mercurial subversion
doit() {
rm -f $logfile
$* 2> $logfile 1>> $logfile
if test "$?" != "0"; then
echo Mercurial SVN mirroring failed
cat $logfile
rm -f $logfile
exit 1
fi
rm -f $logfile
}
cd /home/ompi-hg
doit hg convert --source-type svn http://svn.open-mpi.org/svn/ompi /home/ompi-hg/ompi-svn-mirror
# Also push up to bitbucket
cd ompi-svn-mirror
doit hg push ssh://hg@bitbucket.org/ompiteam/ompi-svn-mirror --new-branch
exit 0