|
0 |
#! /bin/bash
|
|
1 |
#
|
|
2 |
# metche: reducing root bus factor
|
|
3 |
# Copyright (C) 2004-2005 boum.org collective - property is theft !
|
|
4 |
#
|
|
5 |
# This program is free software; you can redistribute it and/or modify
|
|
6 |
# it under the terms of the GNU General Public License as published by
|
|
7 |
# the Free Software Foundation; either version 2 of the License, or
|
|
8 |
# (at your option) any later version.
|
|
9 |
#
|
|
10 |
# This program is distributed in the hope that it will be useful,
|
|
11 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 |
# GNU General Public License for more details.
|
|
14 |
#
|
|
15 |
# You should have received a copy of the GNU General Public License along
|
|
16 |
# with this program; if not, write to the Free Software Foundation, Inc.,
|
|
17 |
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
18 |
#
|
|
19 |
|
|
20 |
set -e
|
|
21 |
shopt -s nullglob
|
|
22 |
|
|
23 |
###
|
|
24 |
### Auxiliary functions
|
|
25 |
###
|
|
26 |
|
|
27 |
function display_usage {
|
|
28 |
( echo "Usage: `basename $0` [-h HOST] list"
|
|
29 |
echo " `basename $0` [-h HOST] report [{stable|testing|unstable}-YYYYMMDDHHMM]"
|
|
30 |
echo " `basename $0` [-h HOST] cron"
|
|
31 |
echo " `basename $0` [-h HOST] stabilize [testing-YYYYMMDDHHMM]"
|
|
32 |
echo "If -h is specified, /etc/metche/HOST.conf is used instead of /etc/metche.conf."
|
|
33 |
echo ""
|
|
34 |
) >&2
|
|
35 |
}
|
|
36 |
|
|
37 |
function fatal() {
|
|
38 |
echo -e "$@" >&2
|
|
39 |
exit 2
|
|
40 |
}
|
|
41 |
|
|
42 |
function debug() {
|
|
43 |
[ $DEBUG -eq 0 ] || echo -e "debug: $@" >&2
|
|
44 |
}
|
|
45 |
|
|
46 |
function email() {
|
|
47 |
debug "email $@"
|
|
48 |
local SUBJECT="$_MAIL_SUBJECT : $1"
|
|
49 |
if [ $ENCRYPT_EMAIL == "yes" ]; then
|
|
50 |
cat |
|
|
51 |
(LC_ALL="$LOCALE" gpg --batch --armor --encrypt --recipient "$EMAIL_ADDRESS") |
|
|
52 |
(LC_ALL="$LOCALE" mutt -s "$SUBJECT" "$EMAIL_ADDRESS")
|
|
53 |
else
|
|
54 |
cat |
|
|
55 |
(LC_ALL="$LOCALE" mutt -s "$SUBJECT" "$EMAIL_ADDRESS")
|
|
56 |
fi
|
|
57 |
}
|
|
58 |
|
|
59 |
###
|
|
60 |
### Configuration
|
|
61 |
###
|
|
62 |
|
|
63 |
DEBUG=1
|
|
64 |
WATCHED_DIR="/etc"
|
|
65 |
BACKUP_DIR="/var/lib/metche"
|
|
66 |
CHANGELOG_DIR="/root/changelogs"
|
|
67 |
DO_PACKAGES="yes"
|
|
68 |
TESTING_TIME="60"
|
|
69 |
STABLE_TIME="3"
|
|
70 |
EMAIL_ADDRESS="root@`hostname -f`"
|
|
71 |
ENCRYPT_EMAIL="no"
|
|
72 |
TAR_OPTS="--exclude *.swp --exclude #* --exclude *~ --exclude=*.key --exclude=ifstate"
|
|
73 |
LOCALE="C"
|
|
74 |
VSERVER_EXEC_PREFIX=""
|
|
75 |
|
|
76 |
_MAIL_SUBJECT="`hostname -f` - changes report"
|
|
77 |
_NO_DEBIAN_PACKAGES_CHANGE="No change in Debian packages state."
|
|
78 |
_NO_CHANGE="No change."
|
|
79 |
|
|
80 |
MAIN_HEADER="
|
|
81 |
c h a n g e s r e p o r t
|
|
82 |
---------------------------
|
|
83 |
|
|
84 |
"
|
|
85 |
|
|
86 |
CHANGELOGS_HEADER="
|
|
87 |
|
|
88 |
Changelogs
|
|
89 |
==========
|
|
90 |
|
|
91 |
"
|
|
92 |
|
|
93 |
FILES_HEADER="
|
|
94 |
|
|
95 |
Changed files
|
|
96 |
=============
|
|
97 |
|
|
98 |
"
|
|
99 |
|
|
100 |
DEBIAN_PACKAGES_HEADER="
|
|
101 |
|
|
102 |
Changes in Debian packages
|
|
103 |
==========================
|
|
104 |
|
|
105 |
"
|
|
106 |
|
|
107 |
FILES_DETAILS_HEADER="
|
|
108 |
|
|
109 |
Details for changed files
|
|
110 |
=========================
|
|
111 |
|
|
112 |
"
|
|
113 |
|
|
114 |
if [ "$1" == "-h" ]; then
|
|
115 |
if [ -f /etc/metche/$2.conf ]; then
|
|
116 |
. /etc/metche/$2.conf
|
|
117 |
CMD="$3"
|
|
118 |
MILESTONE="$4"
|
|
119 |
else
|
|
120 |
display_usage
|
|
121 |
fatal "Config file /etc/metche/$2.conf does not exist."
|
|
122 |
fi
|
|
123 |
elif [ -f /etc/metche.conf ]; then
|
|
124 |
. /etc/metche.conf
|
|
125 |
CMD="$1"
|
|
126 |
MILESTONE="$2"
|
|
127 |
else
|
|
128 |
display_usage
|
|
129 |
fatal "Config file not found."
|
|
130 |
fi
|
|
131 |
|
|
132 |
PATH="/bin:/usr/bin"
|
|
133 |
unset LC_ALL
|
|
134 |
unset LC_CTYPE
|
|
135 |
unset LANGUAGE
|
|
136 |
unset LANG
|
|
137 |
umask 077
|
|
138 |
|
|
139 |
test -d "$WATCHED_DIR" || fatal "WATCHED_DIR ($WATCHED_DIR) does not exist."
|
|
140 |
test -d "$BACKUP_DIR" || fatal "BACKUP_DIR ($BACKUP_DIR) does not exist."
|
|
141 |
|
|
142 |
if [ $ENCRYPT_EMAIL == "yes" ]; then
|
|
143 |
gpg --batch --list-public-keys $EMAIL_ADDRESS >/dev/null 2>&1 \
|
|
144 |
|| fatal "GnuPG public key for $EMAIL_ADDRESS not found."
|
|
145 |
fi
|
|
146 |
|
|
147 |
DATE=`date "+%Y%m%d%H%M"`
|
|
148 |
WATCHED_PARENT=`dirname $WATCHED_DIR`
|
|
149 |
if [ "$WATCHED_PARENT" != '/' ]; then
|
|
150 |
WATCHED_PARENT="$WATCHED_PARENT/"
|
|
151 |
fi
|
|
152 |
|
|
153 |
|
|
154 |
###
|
|
155 |
### Modules enabling/disabling
|
|
156 |
###
|
|
157 |
|
|
158 |
# Changelogs
|
|
159 |
DO_CHANGELOGS="yes"
|
|
160 |
test -d "$CHANGELOG_DIR" || DO_CHANGELOGS="no"
|
|
161 |
|
|
162 |
# Debian packages
|
|
163 |
# Enabled/disabled by $DO_PACKAGES, initialized to "yes", can be
|
|
164 |
# overriden by the sourced conf file.
|
|
165 |
|
|
166 |
|
|
167 |
###
|
|
168 |
### A few functions to do the real work
|
|
169 |
###
|
|
170 |
|
|
171 |
# Returns 0 if, and only if, specified milestone exists.
|
|
172 |
function milestone_exists() {
|
|
173 |
local MILESTONE="$1"
|
|
174 |
if [ -f "${BACKUP_DIR}/${MILESTONE}.tar.bz2" -o -L "${BACKUP_DIR}/${MILESTONE}.tar.bz2" ]; then
|
|
175 |
return 0
|
|
176 |
else
|
|
177 |
return 1
|
|
178 |
fi
|
|
179 |
}
|
|
180 |
|
|
181 |
# Echoes the given milestone's version (i.e. "stable", "testing", "unstable")
|
|
182 |
# if it has a valid version, else "none".
|
|
183 |
# The given milestone can be inexistant.
|
|
184 |
function milestone_version() {
|
|
185 |
local MILESTONE="$1"
|
|
186 |
local VERSION="`echo $MILESTONE | sed 's/-.*$//'`"
|
|
187 |
case $VERSION in
|
|
188 |
stable|testing|unstable)
|
|
189 |
echo $VERSION;;
|
|
190 |
*)
|
|
191 |
echo "none";;
|
|
192 |
esac
|
|
193 |
}
|
|
194 |
|
|
195 |
# Echoes given milestone's date.
|
|
196 |
# Symlinks (e.g.: *-latest) are dereferenced if needed.
|
|
197 |
# The given milestone can be inexistant.
|
|
198 |
function milestone_date() {
|
|
199 |
local MILESTONE="$1"
|
|
200 |
[ ! -L "${BACKUP_DIR}/${MILESTONE}.tar.bz2" ] || MILESTONE="`readlink ${BACKUP_DIR}/${MILESTONE}.tar.bz2`"
|
|
201 |
echo `basename $MILESTONE` | sed 's/.*-//' | sed 's/\..*$//'
|
|
202 |
}
|
|
203 |
|
|
204 |
# Returns 0 if, and only if, the given milestone ($1) is the latest one of its type.
|
|
205 |
# The given milestone can be inexistant.
|
|
206 |
function is_latest() {
|
|
207 |
local FILE MILESTONE
|
|
208 |
local REF_MILESTONE="$1"
|
|
209 |
local REF_DATE="`milestone_date $REF_MILESTONE`"
|
|
210 |
local REF_VERSION="`milestone_version $REF_MILESTONE`"
|
|
211 |
for FILE in "${BACKUP_DIR}/${REF_VERSION}-"*.tar.bz2; do
|
|
212 |
MILESTONE=`basename $FILE | sed 's/\.tar\.bz2$//'`
|
|
213 |
if [ `milestone_date $MILESTONE` -gt $REF_DATE ]; then
|
|
214 |
return 1
|
|
215 |
fi
|
|
216 |
done
|
|
217 |
return 0
|
|
218 |
}
|
|
219 |
|
|
220 |
# This will save an archive of the watched directory with the given prefix
|
|
221 |
function save_files() {
|
|
222 |
debug " - save_files $@"
|
|
223 |
tar jcf "$BACKUP_DIR/$1-$DATE".tar.bz2 \
|
|
224 |
-C "$WATCHED_PARENT" $TAR_OPTS `basename "$WATCHED_DIR"`
|
|
225 |
ln -sf "$1-$DATE".tar.bz2 "$BACKUP_DIR/$1"-latest.tar.bz2
|
|
226 |
}
|
|
227 |
|
|
228 |
# This will save packages list with the given prefix
|
|
229 |
function save_packages() {
|
|
230 |
debug " - save_packages $@"
|
|
231 |
$VSERVER_EXEC_PREFIX apt-show-versions -i
|
|
232 |
$VSERVER_EXEC_PREFIX apt-show-versions | sort > "$BACKUP_DIR/$1-$DATE".packages
|
|
233 |
ln -sf "$1-$DATE".packages "$BACKUP_DIR/$1"-latest.packages
|
|
234 |
}
|
|
235 |
|
|
236 |
# This will save Changelogs with the given prefix
|
|
237 |
function save_changelogs() {
|
|
238 |
debug " - save_changelogs $@"
|
|
239 |
local CHANGELOG DOMAIN file
|
|
240 |
|
|
241 |
for file in "$CHANGELOG_DIR"/*/Changelog; do
|
|
242 |
CHANGELOG="${file##$CHANGELOG_DIR/}"
|
|
243 |
DOMAIN="${CHANGELOG%%/Changelog}"
|
|
244 |
cat "$file" > "$BACKUP_DIR/$1-$DATE.$DOMAIN.Changelog"
|
|
245 |
ln -sf "$1-$DATE.$DOMAIN.Changelog" \
|
|
246 |
"$BACKUP_DIR/$1-latest.$DOMAIN.Changelog"
|
|
247 |
done
|
|
248 |
}
|
|
249 |
|
|
250 |
# Save whatever reflect the current state with the given prefix
|
|
251 |
function save_state() {
|
|
252 |
debug "save_state $@"
|
|
253 |
save_files "$1"
|
|
254 |
[ $DO_PACKAGES == "no" ] || save_packages "$1"
|
|
255 |
[ $DO_CHANGELOGS == "no" ] || save_changelogs "$1"
|
|
256 |
}
|
|
257 |
|
|
258 |
# Report changes against given version to standard output
|
|
259 |
function report_changes() {
|
|
260 |
debug "report_changes $@"
|
|
261 |
local RULER TMP TMPDIR CHANGELOG DOMAIN DIFF TAR_DIFF DIFF_DIFF FILES OLD NEW TMP_PACKAGES file
|
|
262 |
|
|
263 |
# Just for fancy graphics
|
|
264 |
RULER=`echo "$WATCHED_DIR" | tr '[:print:]' '='`
|
|
265 |
|
|
266 |
# File to store results
|
|
267 |
TMP=`mktemp -q`
|
|
268 |
# We need to diff against given version, so extract it
|
|
269 |
TMPDIR=`mktemp -d -q`
|
|
270 |
tar jxf "$BACKUP_DIR/$1".tar.bz2 -C "$TMPDIR"
|
|
271 |
|
|
272 |
echo "$MAIN_HEADER" >> "$TMP"
|
|
273 |
|
|
274 |
if [ $DO_CHANGELOGS == "yes" ]; then
|
|
275 |
echo "$CHANGELOGS_HEADER" >> "$TMP"
|
|
276 |
for file in "$CHANGELOG_DIR"/*/Changelog; do
|
|
277 |
CHANGELOG="${file##$CHANGELOG_DIR/}"
|
|
278 |
DOMAIN="${CHANGELOG%%/Changelog}"
|
|
279 |
DIFF=`LC_ALL=$LOCALE diff -wEbBN "$BACKUP_DIR/$1.$DOMAIN.Changelog" \
|
|
280 |
"$file"` || (echo "$DOMAIN:" ; echo "$DIFF" |
|
|
281 |
grep -v '^[0-9-]\|^\\') >> "$TMP"
|
|
282 |
done
|
|
283 |
fi
|
|
284 |
|
|
285 |
echo "$FILES_HEADER" >> "$TMP"
|
|
286 |
|
|
287 |
# Find differences with tar
|
|
288 |
TAR_DIFF=$(tar jdf "$BACKUP_DIR/$1".tar.bz2 \
|
|
289 |
-C "$WATCHED_PARENT" $TAR_OPTS 2>&1 |
|
|
290 |
# transform:
|
|
291 |
# etc/issue: Gid differs -> etc/issue
|
|
292 |
# tar: etc/irssi.conf: ... -> etc/irssi.conf
|
|
293 |
sed -e 's/\(tar: \)\?\([^:]*\):.*/\2/')
|
|
294 |
# Get new files
|
|
295 |
DIFF_DIFF=$(diff -qr $TAR_OPTS "$TMPDIR"/`basename "$WATCHED_DIR"` "$WATCHED_DIR" 2>/dev/null |
|
|
296 |
# Only in test/etc: issue -> test/etc/issue
|
|
297 |
sed -n -e "s,^Only in $WATCHED_PARENT\([^:]*\): \(.*\),\1/\2,p")
|
|
298 |
FILES="$TAR_DIFF$DIFF_DIFF"
|
|
299 |
if [ "$FILES" = "" ]; then
|
|
300 |
echo "$_NO_CHANGE" >> "$TMP"
|
|
301 |
else
|
|
302 |
for file in $FILES; do
|
|
303 |
OLD="$TMPDIR"/"$file"
|
|
304 |
NEW="$WATCHED_PARENT$file"
|
|
305 |
if [ -e "$OLD" -a -e "$NEW" ]; then
|
|
306 |
echo -n '< '
|
|
307 |
ls -ld "$OLD" | sed -e "s;$TMPDIR/;;"
|
|
308 |
echo -n '> '
|
|
309 |
ls -ld "$NEW" | sed -e "s;$WATCHED_PARENT;;"
|
|
310 |
elif [ -e "$OLD" ]; then
|
|
311 |
echo -n '- '
|
|
312 |
ls -ld "$OLD" | sed -e "s;$TMPDIR/;;"
|
|
313 |
elif [ -e "$NEW" ]; then
|
|
314 |
echo -n '+ '
|
|
315 |
ls -ld "$NEW" | sed -e "s;$WATCHED_PARENT;;"
|
|
316 |
fi
|
|
317 |
done >> "$TMP"
|
|
318 |
fi
|
|
319 |
|
|
320 |
if [ $DO_PACKAGES == "yes" ]; then
|
|
321 |
echo "$DEBIAN_PACKAGES_HEADER" >> "$TMP"
|
|
322 |
|
|
323 |
TMP_PACKAGES=`mktemp -q`
|
|
324 |
$VSERVER_EXEC_PREFIX apt-show-versions -i
|
|
325 |
$VSERVER_EXEC_PREFIX apt-show-versions | sort > "$TMP_PACKAGES"
|
|
326 |
if diff -wEbB "$BACKUP_DIR/$1".packages "$TMP_PACKAGES"; then
|
|
327 |
echo "$_NO_DEBIAN_PACKAGES_CHANGE"
|
|
328 |
fi | grep -v '^[0-9-]' >> "$TMP"
|
|
329 |
fi
|
|
330 |
|
|
331 |
echo "$FILES_DETAILS_HEADER" >> "$TMP"
|
|
332 |
|
|
333 |
# Just diff it!
|
|
334 |
if (LC_ALL=$LOCALE diff -urBN $TAR_OPTS \
|
|
335 |
--minimal "$TMPDIR"/`basename "$WATCHED_DIR"` \
|
|
336 |
"$WATCHED_DIR" 2>/dev/null); then
|
|
337 |
echo "$_NO_CHANGE"
|
|
338 |
fi | grep -v '^--- \|diff ' |
|
|
339 |
sed -e "s;^+++ $WATCHED_PARENT\([^ ]*\) .*;+++ \1;" \
|
|
340 |
>> "$TMP"
|
|
341 |
|
|
342 |
# Put report on standard output
|
|
343 |
cat "$TMP"
|
|
344 |
|
|
345 |
# Clean temporaries
|
|
346 |
rm -rf "$TMP" "$TMPDIR"
|
|
347 |
}
|
|
348 |
|
|
349 |
# Turns into stable the given testing.
|
|
350 |
# NB: argument validity is supposed to have been already checked.
|
|
351 |
function stabilize_state() {
|
|
352 |
debug "stabilize_state $@"
|
|
353 |
local TESTING STABLE FILE DST
|
|
354 |
TESTING="$1"
|
|
355 |
# follow symlink if needed
|
|
356 |
if [ -L "${BACKUP_DIR}/$TESTING".tar.bz2 ]; then
|
|
357 |
TESTING="`readlink ${BACKUP_DIR}/${TESTING}.tar.bz2`"
|
|
358 |
TESTING="`basename $TESTING | sed 's/\..*//'`"
|
|
359 |
fi
|
|
360 |
STABLE="`echo $TESTING | sed 's/^testing/stable/'`"
|
|
361 |
for FILE in "${BACKUP_DIR}/${TESTING}"*; do
|
|
362 |
DST="`echo $FILE | sed 's/\/testing-/\/stable-/'`"
|
|
363 |
cp "$FILE" "$DST"
|
|
364 |
# create/change stable-latest* links if, and only if, it's really the latest
|
|
365 |
is_latest $STABLE && \
|
|
366 |
ln -sf "`basename $DST`" "${BACKUP_DIR}/`basename $DST | sed 's/-[0-9]*\./-latest\./'`"
|
|
367 |
done
|
|
368 |
}
|
|
369 |
|
|
370 |
###
|
|
371 |
### Main
|
|
372 |
###
|
|
373 |
|
|
374 |
# make sure we've got at least one testing and one stable
|
|
375 |
milestone_exists testing-latest || save_state "testing"
|
|
376 |
milestone_exists stable-latest || stabilize_state "testing-latest"
|
|
377 |
|
|
378 |
case "$CMD" in
|
|
379 |
|
|
380 |
report)
|
|
381 |
[ "$MILESTONE" == "" ] && { report_changes "testing-latest"; exit 0; }
|
|
382 |
milestone_exists "$MILESTONE" && { report_changes "$MILESTONE"; exit 0; }
|
|
383 |
display_usage
|
|
384 |
fatal "The specified state does not exist."
|
|
385 |
;;
|
|
386 |
|
|
387 |
list)
|
|
388 |
for file in "$BACKUP_DIR"/*.tar.bz2; do
|
|
389 |
echo `basename ${file%%.tar.bz2}`
|
|
390 |
done
|
|
391 |
exit 0
|
|
392 |
;;
|
|
393 |
|
|
394 |
cron)
|
|
395 |
### Algorithm
|
|
396 |
#
|
|
397 |
# if (no change happened for TESTING_TIME) then
|
|
398 |
# if (something has changed since the last testing) then
|
|
399 |
# send a report against last testing
|
|
400 |
# save a new testing state
|
|
401 |
# delete all saved unstable states
|
|
402 |
# elif (no change happened for STABLE_TIME) then
|
|
403 |
# if (something has changed since the last stable) then
|
|
404 |
# save a new stable state and notify EMAIL_ADDRESS
|
|
405 |
# delete all saved testing states older than STABLE_TIME
|
|
406 |
# fi
|
|
407 |
# fi
|
|
408 |
# elif (last unstable exists) then
|
|
409 |
# if (something has changed since the last unstable) then
|
|
410 |
# save a new unstable state
|
|
411 |
# fi
|
|
412 |
# else
|
|
413 |
# save a new unstable state
|
|
414 |
# fi
|
|
415 |
if [ "`find "$WATCHED_DIR" -cmin "-$TESTING_TIME" | head -1`" == "" ]; then
|
|
416 |
if [ "`find "$WATCHED_DIR" -newer "$BACKUP_DIR"/testing-latest.tar.bz2 | head -1`" != "" ]; then
|
|
417 |
report_changes "testing-latest" | email "testing-$DATE"
|
|
418 |
save_state "testing"
|
|
419 |
debug "removing all saved unstable states."
|
|
420 |
find "$BACKUP_DIR" -name 'unstable-*' -exec rm "{}" \;
|
|
421 |
elif [ "`find "$WATCHED_DIR" -ctime "-$STABLE_TIME" | head -1`" = "" ]; then
|
|
422 |
if [ "`find "$WATCHED_DIR" -newer "$BACKUP_DIR"/stable-latest.tar.bz2 | head -1`" != "" ]; then
|
|
423 |
save_state "stable"
|
|
424 |
echo "metche saved a new stable state : stable-${DATE}." | email "stable-$DATE"
|
|
425 |
debug "removing all saved testing states older that STABLE_TIME ($STABLE_TIME)."
|
|
426 |
find "$BACKUP_DIR" -name 'testing-*' -ctime +"$STABLE_TIME" -exec rm "{}" \;
|
|
427 |
fi
|
|
428 |
fi
|
|
429 |
exit 0
|
|
430 |
fi
|
|
431 |
milestone_exists unstable-latest && \
|
|
432 |
{
|
|
433 |
if [ "`find "$WATCHED_DIR" -newer "$BACKUP_DIR"/unstable-latest.tar.bz2 | head -1`" != "" ]; then
|
|
434 |
save_state "unstable"
|
|
435 |
fi;
|
|
436 |
exit 0;
|
|
437 |
}
|
|
438 |
save_state "unstable"
|
|
439 |
;;
|
|
440 |
|
|
441 |
stabilize)
|
|
442 |
[ "$MILESTONE" == "" ] && { stabilize_state "testing-latest"; exit 0; }
|
|
443 |
"`milestone_version $MILESTONE`" == "testing" \
|
|
444 |
&& milestone_exists $MILESTONE \
|
|
445 |
&& stabilize_state "$MILESTONE"
|
|
446 |
display_usage
|
|
447 |
fatal "The specified state is not an existing testing state."
|
|
448 |
exit 0
|
|
449 |
;;
|
|
450 |
|
|
451 |
test)
|
|
452 |
milestone_version "stable-200507040202"
|
|
453 |
milestone_version "testing-latest"
|
|
454 |
milestone_version "testing-200507030047"
|
|
455 |
milestone_version "testing-200507030047qsfd"
|
|
456 |
milestone_date "stable-200507040202"
|
|
457 |
milestone_date "testing-latest"
|
|
458 |
milestone_date "testing-200507030047"
|
|
459 |
milestone_date "testing-200507030047qsfd"
|
|
460 |
(is_latest testing-latest && echo oui) || echo non
|
|
461 |
(is_latest testing-200507031821 && echo oui) || echo non
|
|
462 |
(is_latest stable-200507031831 && echo oui) || echo non
|
|
463 |
(is_latest stable-200507040202 && echo oui) || echo non
|
|
464 |
;;
|
|
465 |
|
|
466 |
*)
|
|
467 |
display_usage
|
|
468 |
exit 1
|
|
469 |
;;
|
|
470 |
esac
|