]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
mg-execute-flight: New -P (publish) option
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 11 Mar 2015 12:12:29 +0000 (12:12 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 24 Mar 2015 18:58:38 +0000 (18:58 +0000)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
mg-execute-flight

index 287caa06825878316a761cc4b776d4faee6c3d33..7f3d969bbe75003ac710f119846c4c026f77538d 100755 (executable)
@@ -24,12 +24,15 @@ usage () { cat <<END
     -B<blessing>
     -E<email>
     -f<basisflight>
+    -P                [run cr-publish-flight-logs]
 
 END
 }
 
 set -e
 
+publish=false
+
 badusage () { echo >&2 "bad usage"; usage >&2; exit 126; }
 
 while [ $# != 0 ]; do
@@ -38,6 +41,7 @@ while [ $# != 0 ]; do
         -B?*)  blessing=${arg#-B}                      ;;
         -E?*)  email=${arg#-E}                         ;;
        -f?*)   basisflightopt=--that-flight=${arg#-f}  ;;
+       -P)     publish=true                            ;;
        [0-9]*) if [ "x$flight" != x ]; then badusage; fi
                flight=$arg                             ;;
        *)      badusage                                ;;
@@ -90,5 +94,9 @@ cat <tmp/$flight.transcript
 
 exec >&2
 
+if $publish; then
+       ./cr-publish-flight-logs $flight >/dev/null
+fi
+
 /usr/sbin/sendmail -odi -oee -oi -t <tmp/$flight.email
 mv tmp/$flight.email tmp/$flight.email.sent