slitaz-forge view roadmap/roadmap.cgi @ rev 690
tank: add seb vhosts
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Apr 17 13:52:21 2017 +0200 (2017-04-17) |
parents | 04932bc6737c |
children | 061a079077a3 |
line source
1 #!/bin/sh
2 #
3 . /usr/lib/slitaz/httphelper.sh
4 header
6 # Default to next stable release.
7 rel="6.0"
8 [ -n "$(GET release)" ] && rel="$(GET release)"
9 taskdir="releases/$rel"
11 # Show a task.
12 show_task() {
13 cat << EOT
14 <h4>$TASK</h4>
15 <pre>
16 People : $PEOPLE
17 EOT
18 if [ "$WIKI" ]; then
19 echo "Wiki page : <a href="$WIKI">$WIKI</a>"
20 fi
21 if [ "$DESC" ]; then
22 cat << EOT
24 $DESC
25 EOT
26 fi
27 echo '</pre>'
28 }
30 # Usage: list_tasks STATUS
31 list_tasks() {
32 echo "<h3>Tasks List: $1</h3>"
33 count=0
34 for pr in 1 2 3 4
35 do
36 for task in $(fgrep -H "$1" $taskdir/*.conf | cut -d ":" -f 1)
37 do
38 . $task
39 if [ "$PRIORITY" == "$pr" ]; then
40 show_task
41 fi
42 done
43 done
44 [ "$1" == "TODO" ] && [ "$todo" == "0" ] && echo "All done."
45 [ "$1" == "DONE" ] && [ "$done" == "0" ] && echo "Nothing done."
46 }
48 # xHTML header.
49 cat header.html
51 case " $(GET) " in
52 *\ README\ *)
53 echo '<h2>README</h2>'
54 echo '<pre>'
55 cat README
56 echo '</pre>' ;;
57 *)
58 # Get the tasks done and todo
59 tasks=$(ls -1 $taskdir/*.conf | wc -l)
60 done=$(fgrep "DONE" $taskdir/*.conf | wc -l)
61 todo=$(fgrep "TODO" $taskdir/*.conf | wc -l)
62 pct=0
63 [ $tasks -gt 0 ] && pct=$(( ($done * 100) / $tasks ))
64 cat << EOT
65 <h2>Release: $rel</h2>
67 <p>
68 Tasks: $tasks in total - $done finished - $todo todo
69 </p>
70 <div class="pctbar">
71 <div class="pct" style="width: ${pct}%;">${pct}%</div>
72 </div>
73 <p>
74 Tasks lists are ordered by priority. Please read the <a href="?README">README</a>
75 for more information about the SliTaz Roadmap web interface and Hg repo.
76 </p>
77 EOT
78 cat $taskdir/$release/goals.html
79 list_tasks TODO
80 list_tasks DONE ;;
81 esac
83 # Close xHTML page
84 cat << EOT
85 </div>
87 <div id="footer">
88 <a href="http://www.slitaz.org/">SliTaz Website</a> - Roadmap:
89 EOT
90 for release in $(ls releases)
91 do
92 echo "<a href=\"?release=$release\">$release</a>"
93 done
94 cat << EOT
95 </div>
97 </body>
98 </html>
99 EOT
101 exit 0