first version.
[build-srcpkg.git] / bin / dbglogview
blob00c0af60f3b2dfa0c7ce7454f8e49bfe2d107959
1 #!/bin/bash
2 ############################################################
3 # source: dbglogview
4 # author: CottonCandyOwner(CottonCandyOwner@126.com)
5 # date: 2022-05-16
6 ############################################################
7 # note:
8 # 日志、调试信息输出的浏览程序。对fmtdbgout输出的不同的日志信息
9 # 进行解析。
10 ############################################################
13 # todo:
14 # @
15 # @
18 . shlibinc
20 include gplib.shlib
22 #include stdio.shlib
23 #include term.shlib
24 #include args.shlib
26 #include paths.shlib
29 ######################
30 # section: 公用注释信息
31 ######################
35 ######################
36 # section: 变量定义
37 ######################
39 TMPL_FILE_PATH=/usr/share/tmpl
41 usage="usage: $(basename $0) [options] <tmpl-name>
43 this program use templete defined in .tmpl, which stored
44 in $TMPL_FILE_PATH.
46 option descript:
47 -t test for debug
48 -o output file name
49 -n name param for .tmpl file. other param defined in enviroument vars.
50 -h helper information.
54 ######################
55 # section: private函数
56 ######################
59 # fsyntax: sys_paths_gen
60 # fdesc: 设置程序运行时使用的路径环境变量。
61 sys_paths_gen ()
67 # fsyntax: prog_paths_gen
68 # fdesc: 设置程序运行时使用的路径环境变量。
69 prog_paths_gen ()
75 # fsyntax: inst_paths_gen
76 # fdesc: 设置安装程序运行时使用的路径环境变量。
77 inst_paths_gen ()
84 ######################
85 # section: public函数
86 ######################
88 main ()
91 # 参数解析
93 while getopts :to:n:h opt; do
94 case "$opt" in
96 echo -ne "param -t and its opt $OPTARG\n"
99 echo -ne "param -t and its opt $OPTARG\n"
100 sys_paths_gen
103 echo -ne "param -t and its opt $OPTARG\n"
104 prog_paths_gen
107 echo -ne "$usage"
110 echo -ne "does not use '$@' opt.\n"
112 esac
113 done
114 # rollback to first opt
115 shift $(( $OPTIND - 1 ))
117 # init_dbglogout 2 testing 20000
119 # todo:
120 # ini文件加载环境变量
125 #echo xxxxxxxxxx
126 #exit
128 main "$@"
130 ######################
131 # section: file tail
132 ######################