在ubuntu下利用svn命令導出兩個版本之間更改的文件
#!/bin/sh
#
dt=`date +%Y%m%d%H%M`
FN='/data/svn_test/modifylist/'$dt
SVNDES='/home/linux/work/svn'
if [ $# -eq 2 ];then
cd /home/linux/work/svn
svn diff --summarize -r $1:$2|awk '{print $2}' >> $FN.txt
target='/data/svn_test/source/vip_code_'$1'_'$2
/usr/bin/rsync -rltDv --files-from=$FN.txt /home/linux/work/svn $target
### tar
cd /data/svn_test
ap=`tar -czPf /data/svn_test/vip_code_$1_$2_$dt.tar.gz /data/svn_test/source/*`
#tmp=`/bin/cp -fr $path/$1/* $target`
fi
echo "tar ok!"