forked from MRtrix3/mrtrix3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate_doc
executable file
·75 lines (54 loc) · 1.74 KB
/
update_doc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
folder=$(mktemp -d)
(
set -e
cp format_config_options $folder
cd $folder
echo Using temporary folder $folder
git clone [email protected]:MRtrix3/mrtrix3.git mrtrix3
(
cd mrtrix3
./doxygen
./configure
./build 2>/dev/null
)
git clone [email protected]:MRtrix3/mrtrix3-dev-doc.git
(
set -e
cd mrtrix3-dev-doc
rm -rf *
cp -r ../mrtrix3/dev/html/* .
git add .
git commit -a -m "automatic update of dev doc"
git push
)
git clone [email protected]:MRtrix3/mrtrix3.wiki.git
rm -rf mrtrix3.wiki/commands/list
mkdir -p mrtrix3.wiki/commands/list
rm -rf mrtrix3.wiki/scripts/list
mkdir -p mrtrix3.wiki/scripts/list
echo '[[Home]]
[[MRtrix 0.2 equivalent commands]]
**Commands**<br>
' > mrtrix3.wiki/commands/_Sidebar.md
for n in mrtrix3/bin/*; do
$n __print_usage_markdown__ > mrtrix3.wiki/commands/list/$(basename $n).md
echo '[['$(basename $n)']]<br>' >> mrtrix3.wiki/commands/_Sidebar.md
done
echo '[[Home]]
**Scripts**<br>
' >> mrtrix3.wiki/scripts/_Sidebar.md
for n in `find mrtrix3/scripts/ -type f -print0 | xargs -0 grep -l "lib.app.initParser"`; do
$n __print_usage_markdown__ > mrtrix3.wiki/scripts/list/$(basename $n).md
echo '[['$(basename $n)']]<br>' >> mrtrix3.wiki/scripts/_Sidebar.md
done
grep -rn --include=\*.h --include=\*.cpp '^\s*//CONF\b ' mrtrix3 | sed -ne 's/^.*CONF \(.*\)/\1/p' | ./format_config_options > mrtrix3.wiki/DesignPrinciples/List-of-configuration-file-options.md
(
cd mrtrix3.wiki
git add commands scripts DesignPrinciples/List-of-configuration-file-options.md
git commit -m "automatic update of command and script documentation"
git push
)
)
echo cleaning up...
rm -rf $folder