现在的位置: 首页 > 综合 > 正文

ffmpeg-0.11.1编译具体之libavcodec/codec_names.sh

2013年09月18日 ⁄ 综合 ⁄ 共 698字 ⁄ 字号 评论关闭

【有误之处请指正,勤能补拙】

1. #!/bin/sh指定该脚本的执行程序

2.
set -e
Every script you write should include set -e at the top. 

This tells bash that it should exit the script
if any statement 

returns a non-true return value.

 For more set, find here : http://hi.baidu.com/jingxiaobing/item/4ed4471d0a4fc5fb64eabf81

3. $0:脚本名字。此变量包含地址,可以使用basename $0获得脚本名称。$1:第一个参数,以此类推。

4.[ -n "$var" ] :判断$var变量是否有值

5. $* 以一个单字符串显示所有向脚本传递的参数

6.
parse_config_h ()
函数,扫描定义为1的宏并打印,config.h中内容如:

#define
HAVE_PPC4XX 0
#define HAVE_SSE 1

7.read
var: 提示用户输入,并将输入赋值给变量

8.
eval
看各方教程,或如:http://bbs.365master.com/redirect.php?tid=122331&goto=lastpost

9.
parse_avcodec_h ()
函数,对应于codec_names.h头文件。

10.[
] 匹配一组字符中的任意一个 /[Ll]ove/匹配Love或love的行。同行中%%意思是从$line的右边去除,[=,]的匹配。

11.${1#0},1代表$1,0代表$0,意思是在前者中去掉字串(也就是后者)。


大体就是这样了。

抱歉!评论已关闭.