Repository navigation
Expand file tree
/
Copy pathgen_dot_md.sh
More file actions
executable file
·140 lines (110 loc) · 2.79 KB
/
Copy pathgen_dot_md.sh
File metadata and controls
executable file
·140 lines (110 loc) · 2.79 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/bin/bash
branch_list="master wip-lisem wip-platform 0.6.4"
scrut_file="icmd/Quality.md"
cover_file="icmd/Coverage.md"
build_file="icmd/Build.md"
sep () {
echo -n " | "
}
table_init () {
##### Table header #####
sep
echo -n "Name"
sep
for branch in ${branch_list}
do
echo -n ${branch}
sep
done
echo
##### Table line #####
sep
echo -n "--"
sep
for branch in ${branch_list}
do
echo -n "--"
sep
done
echo
}
repo_check ()
{
curl -f "https://github.com/${account}/${repo}/tree/${branch}" > /dev/null 2>&1
}
repo_link () {
branch=master
repo_check
if [ $? -eq 0 ]
then
echo -n "[${repo}](https://github.com/${account}/${repo})"
fi
sep
}
scrut_link () {
sep
repo_link
for branch in ${branch_list}
do
repo_check
if [ $? -eq 0 ]
then
echo -n "[](https://scrutinizer-ci.com/g/${account}/${repo}/?branch=${branch})"
fi
sep
done
echo
}
travis_link () {
sep
repo_link
for branch in ${branch_list}
do
repo_check
if [ $? -eq 0 ]
then
echo -n "[](https://travis-ci.org/${account}/${repo})"
fi
sep
done
echo
}
cover_link () {
sep
repo_link
for branch in ${branch_list}
do
repo_check
if [ $? -eq 0 ]
then
echo -n " [](https://coveralls.io/github/${account}/${repo}?branch=${branch}) "
fi
sep
done
echo
}
echo "## Scrutinizer #" > ${scrut_file}
echo "## Travis #" > ${build_file}
echo "## Coveralls #" > ${cover_file}
for search_dir in $@
do
project_name=$(basename ${search_dir})
echo >> ${scrut_file}
echo "### [${project_name}](https://github.com/${project_name}/) #" >> ${scrut_file}
table_init >> ${scrut_file}
echo >> ${build_file}
echo "### [${project_name}](https://github.com/${project_name}/) #" >> ${build_file}
table_init >> ${build_file}
echo >> ${cover_file}
echo "### [${project_name}](https://github.com/${project_name}/) #" >> ${cover_file}
table_init >> ${cover_file}
for ff in $(find ${search_dir} -maxdepth 2 -name 'composer.json' |sort -u)
do
fd=$(dirname ${ff})
repo=$(basename ${fd})
account=$(basename $(dirname ${fd}))
scrut_link >> ${scrut_file}
travis_link >> ${build_file}
cover_link >> ${cover_file}
done
done