几个简单常用的脚本

自己写的几个简单常用的脚本By: 吴垠Date: 2007-02-01Homepage: http://blog.csdn.net/wooinEmail: lazy_fox#msn.com版权信息: 该文章版权由吴垠和他可爱的老婆小包子所有。可在非商业目的下任意传播和复制。对于商业目的下对本文的任何行为需经作者同意。联系方式:lazy.fox.wu#gmail.com1. 清除一个svn工作目录中的所有.svn文件夹,包括所有的子目录,使其成为一个普通的文件夹,不再受svn控制。1 #!/bin/sh2 #################################################################################3 # Filename: svn_clear4 # Author: Wu Yin(吴垠)5 # Email: lazy_fox@gmail.com6 # Created: 2007-10-267 # Description: Clear a svn working copy, make it a nomal directory.8 # Usage: svn_clear [PATH]9 # "svn_clear" will remove all the ".svn" directory recursively10 # from the PATH you gived. The current directory by default.11 #################################################################################12 13 WORK_PATH=$114 if [ -z "$WORK_PATH" ]; then15 WORK_PATH="."16 fi17 18 for files in `tree -difa $WORK_PATH | grep '.svn$'`19 do20 echo "Cleaning" $files " ... "21 rm -rf $files22 done232. 在所给路径下,或但前路径下创建新的tag文件,或者重建现存的tag文件,tag文件包括Ctags文件和Cscope文件。运行该脚本后应该会生成或更新以下几个文件。 cscope.in.out cscope.out cscope.po.out tags1 #!/bin/sh2 #################################################################################3 # Filename: tag_rebuild4 # Author: Wu Yin(吴垠)5 # Email: lazy_fox@gmail.com6 # Created: 2007-9-197 # Description: Rebuild Ctags and Cscope files at the path you assign8 # Usage: tag_rebuild [PATH]9 # "tag_rebuild" will rebuild the Cscope tag file and Ctags 10 # tag file at the PATH you gived. The current directory by default.11 # The following files will be created or rebuilded after you 12 # run "tag_rebuild".13 # > cscope.in.out14 # > cscope.out15 # > cscope.po.out16 # > tags17 ################################################################################18 19 WORK_PATH=$120 if [ -z "$WORK_PATH" ]; then21 WORK_PATH="."22 fi23 24 cd $WORK_PATH25 26 echo "Cscope ... " $WORK_PATH27 cscope -bqR28 echo "Ctags ... " $WORK_PATH29 ctags -R --fields=+lS30
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值