... | ... |
@@ -43,6 +43,50 @@ function fgfs () { |
43 | 43 |
done |
44 | 44 |
unset control_system_data control_system update_command |
45 | 45 |
;; |
46 |
+ check) |
|
47 |
+ typeset -A revision builtstatus |
|
48 |
+ for component in simgear flightgear; do |
|
49 |
+ cd $fgfs_source/$component |
|
50 |
+ revision[$component]=$(git rev-parse HEAD) |
|
51 |
+ cd - > /dev/null 2>&1 |
|
52 |
+ done |
|
53 |
+ xmlgetnext () { |
|
54 |
+ local IFS='>' |
|
55 |
+ read -d '<' TAG VALUE |
|
56 |
+ } |
|
57 |
+ unset entryid |
|
58 |
+ wget -qO- http://build.flightgear.org:8080/job/fgfs/rssAll | while xmlgetnext; do |
|
59 |
+ case "$TAG" in |
|
60 |
+ "entry") |
|
61 |
+ let entryid++ |
|
62 |
+ unset stable jenkins_id updated |
|
63 |
+ ;; |
|
64 |
+ "title") |
|
65 |
+ test -n "$entryid" && stable=$(sed -r 's/^.*\((.+)\)/\1/' <<< "$VALUE") |
|
66 |
+ ;; |
|
67 |
+ "id") |
|
68 |
+ test -n "$entryid" && jenkins_id="${VALUE##*:}" |
|
69 |
+ ;; |
|
70 |
+ "updated") |
|
71 |
+ test -n "$entryid" && updated="$VALUE" |
|
72 |
+ ;; |
|
73 |
+ "/entry") |
|
74 |
+ joburl=http://build.flightgear.org:8080/job/fgfs/$jenkins_id |
|
75 |
+ regex='s|^.+<strong>Revision:</strong> (.+)$|\1|p' |
|
76 |
+ if test "$(wget -qO- $joburl/git-2/ | sed -rn $regex)" = ${revision[simgear]} -a \ |
|
77 |
+ "$(wget -qO- $joburl/git-3/ | sed -rn $regex)" = ${revision[flightgear]}; then |
|
78 |
+ echo $(date +"$stable (#$jenkins_id, updated %d %B, %H:%M)" -d "$updated") |
|
79 |
+ unset revision builtstatus entryid |
|
80 |
+ return 0 |
|
81 |
+ elif test $entryid -eq 5; then |
|
82 |
+ echo $(date +"no build info found (last %d %B, %H:%M)" -d "$updated") |
|
83 |
+ unset revision builtstatus entryid |
|
84 |
+ return 1 |
|
85 |
+ fi |
|
86 |
+ ;; |
|
87 |
+ esac |
|
88 |
+ done |
|
89 |
+ ;; |
|
46 | 90 |
build) |
47 | 91 |
local simultaneous=$(nproc) |
48 | 92 |
local previously_installed=() |
... | ... |
@@ -180,7 +224,7 @@ function fgfs () { |
180 | 224 |
######## AUTRE OPTION |
181 | 225 |
else |
182 | 226 |
case $fgfs_arg in |
183 |
- --update(-data|-source|-build|-fgaddon|)) |
|
227 |
+ --update(-data|-source|-build|-fgaddon|-check|)) |
|
184 | 228 |
for up in ${${=${fgfs_arg#--update}:-data source build}#-}; do |
185 | 229 |
update_fg $up |
186 | 230 |
done |