牵着老婆满街逛

严以律己,宽以待人. 三思而后行.
GMail/GTalk: yanglinbo#google.com;
MSN/Email: tx7do#yahoo.com.cn;
QQ: 3 0 3 3 9 6 9 2 0 .

一些项目中用到的脚本和批处理

文件名:backup.sh
描述:用于在linux下面备份项目代码.
#!/bin/sh
#FileName :backup

DIRS="server client Common MSVC SimClient Robot" 
BACKUP
="./"proj_$(date +%y%m%d).tgz 

tar 
-c $DIRS | gzip -9 > $BACKUP 

文件明:clean.bat
描述:用于在windows下面清除vs产生的中间文件.
del *.pch /s /q
del 
*.ncb /s /q
del 
*.opt /s /q
del 
*.plg /s /q
del 
*.obj /s /q
del 
*.bsc /s /q
del 
*.bak /s /q
del 
*.pdb /s /q
del 
*.mdb /s /q
del 
*.exp /s /q
del 
*.ilk /s /q
del 
*.idb /s /q
del 
*.aps /s /q
del 
*.suo /s /q /a:h
del 
*.o /s /q
pause

文件名:Pack.bat
描述:用于在windows下打包文件.
@echo on
del 
/q/f/s/a *.dat *.db
for /f "usebackq " %%i in (`dir /ad /b`) do start /w winrar a "%%i.dat" -afzip -pPassword -m5 -x"*.dat" "%%i"
pause

以上是我比较常用一点的小工具.
还有Makefile.
记得以前有一个用于在linux下面提交CVS的脚本,不过不太常用,就不知道扔哪去了.

posted on 2007-08-26 18:43 杨粼波 阅读(327) 评论(0)  编辑 收藏 引用