Thursday, August 31, 2006
Mirror Up
Here's the shell script I wrote that updates the vendor drop in our repository with the latest code from the Sakai 2.2.x maintenance branch. All the magic is in svn_load_dirs.pl which comes with Subversion. One piece that may look odd is those two lines of perl in the middle. I am erasing all those $Url and $Id comment lines from all the code, because those will actually show up as conflicts with my own code when I do the svn merge.
#!/bin/sh
rev="`svn info -r HEAD https://source.sakaiproject.org/svn | grep Revision: | sed -e 's/Revision: /r/g'`"
echo exporting Sakai at $rev
svn export -q -$rev https://source.sakaiproject.org/svn/sakai/branches/sakai_2-2-x $rev
echo getting rid of those darn Url and Id comments
for file in `grep -lr '\$URL' ./$rev/*`
do
perl -pi -e 's/\$URL.*\$//i' $file
perl -pi -e 's/\$Id.*\$//i' $file
done
echo synching repository with Sakai $rev
svn_load_dirs.pl -no_user_input -t $rev svn://projects.its.txstate.edu/tracs/vendor/sakai current ./$rev
Comments:
<< Home
Hey Z,
A couple of questions -
Do you cron this, or run it by hand as needed?
Did you drop the mass perl-mongling in favor of tuning the svn properties on your local copy?
A couple of questions -
Do you cron this, or run it by hand as needed?
Did you drop the mass perl-mongling in favor of tuning the svn properties on your local copy?
So far, I'm still doing it by hand, roughly once a week or so.
And I keep meaning to figure out how to do it the "right" way, but I'm still perl-mongling!
Post a Comment
And I keep meaning to figure out how to do it the "right" way, but I'm still perl-mongling!
<< Home