I usually end up forgetting how to do this, so here are my instructions of how to keep Usermin, an administration tool I use for my Lime Daley customers, up-to-date with the developers' changes.

wget usermin-1.240.tgz
tar -xzf usermin-1.240.tgz

# get the vendor's last version
svn checkout https://limedaley.com/svn/vendor/usermin/current

# remove all the files
cd current
find -type f ! -wholename *\/.svn\/* -exec rm \{} \;

cp -r ../usermin-1.240/ .

# usermin by default uses perl in the /usr/local/bin directory
find -type f ! -wholename *\/.svn\/* -exec sed -i -e
    's/#\!\/usr\/local\/bin\/perl/#\!\/usr\/bin\/perl/' \{} \;

# check differences - perlpath.pl shouldn't be changed

svn remove `svn stat | grep "^!" | awk '{print $2}'`
svn add `svn stat | grep "^?" | awk '{print $2}'`

# look at changes
svn stat | grep "^M"

svn commit -m "updated to new version 1.240"

# tag new version
svn copy . https://limedaley.com/svn/vendor/usermin/tags/1.240-install

# merge vendor changes to our trunk
cd ..
svn checkout https://limedaley.com/svn/vendor/usermin/mine/trunk mine
cd mine
svn merge https://limedaley.com/svn/vendor/usermin/tags/1.230-install
          https://limedaley.com/svn/vendor/usermin/tags/1.240-install .

# fix any problems/conflicts

# checkin our modified version
svn commit -m "first attempt at installing 1.240"

# copy to production site
cd /usr/local/usermin
svn update

Posted by Jon Daley on December 2, 2006, 9:58 pm | Read 3467 times
Category Programming: [first] [previous] [next] [newest]
Add Comment
Add comment
E-mail me when comments occur on this article