[pLog-svn] r2433 - plog/branches/plog-1.0.2/bin-devel
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Thu Sep 1 20:37:55 GMT 2005
Author: oscar
Date: 2005-09-01 20:37:54 +0000 (Thu, 01 Sep 2005)
New Revision: 2433
Added:
plog/branches/plog-1.0.2/bin-devel/build-diff.sh
Log:
generates folders with files that we added or updated when comparing two svn folders/branches/tags
Added: plog/branches/plog-1.0.2/bin-devel/build-diff.sh
===================================================================
--- plog/branches/plog-1.0.2/bin-devel/build-diff.sh 2005-09-01 13:23:56 UTC (rev 2432)
+++ plog/branches/plog-1.0.2/bin-devel/build-diff.sh 2005-09-01 20:37:54 UTC (rev 2433)
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# where to find the svn repository
+SVNSERVER="http://devel.plogworld.net"
+SVNREPO="/svn/plog/plog"
+
+# check paramters
+if [ $# -ne 2 ]; then
+ echo "Creates a folder with the folders that were added or updated when comparing"
+ echo "two subversion folders or branches"
+ echo " "
+ echo "Usage: $0 branch1 branch2"
+ echo " "
+ echo "Where branch1 and branch2 are two different branches/folders from the repository"
+ echo " "
+ echo "Example:"
+ echo " "
+ echo " $0 tags/plog-1.0.1 branches/plog-1.0.2"
+ exit -1
+fi
+
+# parameters with the branches
+BRANCH1=$1
+BRANCH2=$2
+
+# create our temporary folder
+WORKFOLDER=`date +%Y%m%d%H%M`
+DESTFOLDER="destination"
+mkdir $WORKFOLDER
+mkdir $DESTFOLDER
+
+# checkout the first branch
+echo "Checking out $BRANCH1..."
+svn checkout $SVNSERVER$SVNREPO/$BRANCH1 $WORKFOLDER > /dev/null
+# switch to the second one
+cd $WORKFOLDER
+echo "Switching to $BRANCH2..."
+svn switch $SVNSERVER$SVNREPO/$BRANCH2 > files
+cd ..
+
+echo "Copying new or updated files..."
+for i in `cat $WORKFOLDER/files|grep [^UA]|grep -v revision|awk '{print $2}'`
+do
+ echo Keeping: $i
+ FOLDER=`dirname $i`
+ mkdir -p $DESTFOLDER/$FOLDER
+ cp $WORKFOLDER/$i $DESTFOLDER/$FOLDER
+done
+
+# remove temporary folders
+rm -rf $WORKFOLDER
+
+echo "Done! Output available under the $DESTFOLDER/ folder"
Property changes on: plog/branches/plog-1.0.2/bin-devel/build-diff.sh
___________________________________________________________________
Name: svn:executable
+ *
More information about the pLog-svn
mailing list