使用Windows的朋友自然不觉得这是一个多麻烦的事情,毕竟有"小乌龟"嘛.可是,作为拥护Unix&Shell以及崇尚"DRY"原则,还不时热爱捣鼓点新鲜玩意儿的本博来说:岂有不用shell实现的道理;)
#!/bin/bash
export trunk_dir=/root/dp-trunk/
export release_dir=/root/dp-release/dp-0.1.0/
trunk=`svn up $trunk_dir|grep revision|awk -F' ' '{ print $3 }'|awk -F'.' '{print $1}'`
release=`svn info $release_dir | grep "Last Changed Rev"|awk -F: '{print $2}'`
info=`svn merge -r $release:$trunk $trunk_dir $release_dir && svn ci -m '' $release_dir`
echo $info
export trunk_dir=/root/dp-trunk/
export release_dir=/root/dp-release/dp-0.1.0/
trunk=`svn up $trunk_dir|grep revision|awk -F' ' '{ print $3 }'|awk -F'.' '{print $1}'`
release=`svn info $release_dir | grep "Last Changed Rev"|awk -F: '{print $2}'`
info=`svn merge -r $release:$trunk $trunk_dir $release_dir && svn ci -m '' $release_dir`
echo $info
No comments:
Post a Comment