自己写的几个简单常用的脚本By: 吴垠Date: 2007-02-01Homepage: http://blog.youkuaiyun.com/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
几个简单常用的脚本
最新推荐文章于 2025-05-16 17:51:30 发布