博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
protobuf2.5工程及c文件格式化脚本
阅读量:7276 次
发布时间:2019-06-29

本文共 1447 字,大约阅读时间需要 4 分钟。

hot3.png

#! /bin/sh -e# This script downgrades MSVC 2008 projects to MSVC 2005 projects, allowing# people with MSVC 2005 to open them.  Otherwise, MSVC 2005 simply refuses to# open projects created with 2008.  We run this as part of our release process.# If you obtained the code direct from version control and you want to use# MSVC 2005, you may have to run this manually.  (Hint:  Use Cygwin or MSYS.)doSln() {	for file in *.sln; do		echo "downgrading $file..."		sed -i -re 's/Format Version 9.00/Format Version 10.00/g;				  s/Visual Studio 2005/Visual Studio 2008/g;' $file	done}doVcproj() {	for file in *.vcproj; do		echo "downgrading $file..."		sed -i -re 's/Version="8.00"/Version="9.00"/g;' $file	done}fileList() {	local basedir=$1	for dir in $(ls $basedir)	do		dir=$basedir$dir		if [ -f "$dir" ];then			echo "$dir"		elif [ -L "$dir" ]; then			echo "$dir"		else			fileList $dir/		fi	done}doSlndoVcprojcd ../gtest/msvcdoSlndoVcprojcd ../../echo "fmort c and cpp files"fileList "./" | while read linedo	filename=`echo $line | awk -F"." '{if(NF>2){print $(NF);}}'`	if [[ $filename = "c" || $filename = "cc" || $filename = "cpp" || $filename = "h" || $filename = "hpp" ]]; then		astyle --style=ansi $line	fidonefileList "./" | while read linedo	filename=`echo $line | awk -F"." '{if(NF>2){print $(NF);}}'`	if [ "$filename" = "orig" ];then		echo "rm -f $line"		rm -f $line	fidone# Yes, really, that's it.

转载于:https://my.oschina.net/u/659405/blog/293716

你可能感兴趣的文章
追梦路上
查看>>
Centos7 gvim sougou搜狗输入法无法切换
查看>>
邻接表链式结构的实现和顺序结构的实现
查看>>
meta标签详解:源http://blog.csdn.net/kongjiea/article/details/17092413
查看>>
内存泄露&内存溢出
查看>>
屏蔽webvie嵌套页广告
查看>>
Dynamics CRM 报表导出EXCEL 列合并问题的解决方法
查看>>
MTK6573的LDO控制
查看>>
【工具】-RAP接口管理工具
查看>>
***单文件搞定微信支付和支付宝支付
查看>>
Adminimize 插件:WordPress根据用户角色显示/隐藏某些后台功能
查看>>
运维老鸟教你安装centos6.5如何选择安装包
查看>>
oracle的nvl和sql server的isnull
查看>>
Entity Framework Code-First(13):Configure Many-to-Many
查看>>
Hash的应用
查看>>
如何解决缺少OCX问题,如何在win7 64位下注册OCX
查看>>
《程序员代码面试指南》第五章 字符串问题 将整数字符串转成整数值
查看>>
python模拟登录人人网
查看>>
SSM整合过程中出现的问题
查看>>
第四十三天
查看>>