Add LTTngUSTLogger logger plugin
[deliverable/titan.core.git] / help / chm_refact.sh
1 #!/bin/bash
2 ###############################################################################
3 # Copyright (c) 2000-2016 Ericsson Telecom AB
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Eclipse Public License v1.0
6 # which accompanies this distribution, and is available at
7 # http://www.eclipse.org/legal/epl-v10.html
8 #
9 # Contributors:
10 # Balasko, Jeno
11 # Forstner, Matyas
12 #
13 ###############################################################################
14
15 cd chm
16
17 for i in info/*.html titan_index.html
18 do
19 echo Processing $i
20 if [[ $i = 'info/BNF.html' ]]
21 then
22 sed -e 's|<a href="http://www\.inet\.com/">|<a href="http://www.inet.com/" target="_blank">|g' $i >tmp
23 mv tmp $i
24 elif [[ $i = 'titan_index.html' ]]
25 then
26 sed -e '11,17d;20d' $i >tmp
27 mv tmp $i
28 else
29 line21=$(sed -n -e '21p' $i)
30 if [[ -n $(echo $line21 | grep -e 'ao\.jpg') ]]
31 then echo "$i is 1 (ao)"
32 sed \
33 -e '11,18d' \
34 -e '21d' \
35 $i >tmp
36 mv tmp $i
37 elif [[ -n $(echo $line21 | grep -e 'up\.jpg') ]]
38 then echo "$i is 2 (up)"
39 sed \
40 -e '11,17d' \
41 -e '20d' \
42 $i >tmp
43 mv tmp $i
44 elif [[ -n $(echo $line21 | grep -e '<table border="0" align="right" cellpadding="0" cellspacing="0">') ]]
45 then echo "$i is 3 (table)"
46 sed \
47 -e '11,20d' \
48 -e '23d' \
49 $i >tmp
50 mv tmp $i
51 else echo "$i is ? : $line21"
52 fi
53 fi
54
55 sed \
56 -e 's|\(<a href="\(\.\./info/\)\?BNF\.html[^"]*"\) *target="_blank">|\1>|gI' \
57 -e 's|\(<a href="[a-zA-Z0-9_]*\.html[^"]*"\) *target="_blank">|\1>|gI' \
58 -e '
59 :t
60 /<[aA] [^>]*\.\.\/docs\// {
61 /<\/[aA]>/!{
62 N;
63 bt
64 }
65 s/<[aA] [^>]*\.\.\/docs\/[^>]*>\([^<]*\)<\/[Aa]>/\1/g;
66 }
67 ' \
68 $i >tmp
69 mv tmp $i
70 done
This page took 0.032015 seconds and 5 git commands to generate.