1
1

Save a copy of the script that runs via cron to update the bitbucket

mercurial repo.

This commit was SVN r31335.
Этот коммит содержится в:
Jeff Squyres 2014-04-08 12:23:52 +00:00
родитель db44e23f72
Коммит f0c32a28e5

39
contrib/nightly/openmpi-upate-hg-svn.sh Исполняемый файл
Просмотреть файл

@ -0,0 +1,39 @@
#!/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