
Module: ppl/w3ppl Branch: master Commit: d48b7ca6ddd4ce0578cc53b3b0a8a6a80b1343ed URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/w3ppl.git;a=commit;h=d48b7ca6ddd...
Author: Abramo Bagnara abramo.bagnara@gmail.com Date: Tue Apr 7 19:07:15 2009 +0200
Converted to git.
---
bin/update_web_site | 27 ++++++++++++++++++--------- 1 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/bin/update_web_site b/bin/update_web_site index efbe1a2..8ac559f 100755 --- a/bin/update_web_site +++ b/bin/update_web_site @@ -6,15 +6,14 @@
BRANCH=ppl-0_10-branch
-export CVS_RSH=ssh export PATH=/usr/local/bin:$PATH
# Where the repository is on cvs.cs.unipr.it. -local_repository=/cvs/ppl +local_repository=/git/ppl
# Where the repository is for remote developers. #remote_repository=$USER@cvs.cs.unipr.it:$local_repository -remote_repository=bagnara@cvs.cs.unipr.it:$local_repository +remote_repository=ssh://bagnara@git.cs.unipr.it$local_repository
# The local machine. machine=`uname -n` @@ -49,17 +48,28 @@ notification=$top_dir/notification # Lock file name. lock=.LOCK
+fetch_branch() { + repo=$1 + module=$2 + branch=$3 + mkdir $module && + (cd $module && + git init && + git remote add origin $repo/$module.git -t $branch -m $branch && + git fetch --depth=1 && + git checkout --track -b $branch origin/$branch) +} + obtain_sources() { case "$machine" in spartacus.cs.unipr.it) - cvs -d $local_repository export -D today w3ppl + fetch_branch $local_repository w3ppl master if [ $? -ne 0 ] then echo "Cannot copy the PPL web pages." >>$notification maybe_notify_developers_and_exit fi - cvs -z 9 -d $local_repository export -r $BRANCH ppl - #cvs -z 9 -d $local_repository export -D today ppl + fetch_branch $local_repository ppl $BRANCH if [ $? -ne 0 ] then echo "Cannot export the PPL sources." >>$notification @@ -83,14 +93,13 @@ obtain_sources() { fi ;; *) - cvs -d $remote_repository export -D today w3ppl + fetch_branch $remote_repository w3ppl master if [ $? -ne 0 ] then echo "Cannot export the PPL web pages." >>$notification maybe_notify_developers_and_exit fi - cvs -z 9 -d $remote_repository export -r $BRANCH ppl - #cvs -z 9 -d $remote_repository export -D today ppl + fetch_branch $remote_repository ppl $BRANCH if [ $? -ne 0 ] then echo "Cannot export the PPL sources." >>$notification