OSDN Git Service

Generate output even in case of error
authorJean-Baptiste Queru <jbq@google.com>
Mon, 25 Jun 2012 19:42:59 +0000 (12:42 -0700)
committerJean-Baptiste Queru <jbq@google.com>
Mon, 25 Jun 2012 22:52:04 +0000 (15:52 -0700)
Bug: 4295425
Change-Id: Iab20687a11a585fde20714c807df8bc8145e9ddf

generate-blob-lists.sh

index a16471b..f12936c 100755 (executable)
@@ -80,9 +80,9 @@ fi
 
 for DEVICENAME in $DEVICES
 do
+  MANUFACTURERNAME=$( find device -type d | grep [^/]\*/[^/]\*/$DEVICENAME\$ | cut -f 2 -d / )
   if test $(wc -l < $ARCHIVEDIR/$DEVICENAME-without.txt) != 0 -a $(wc -l < $ARCHIVEDIR/$DEVICENAME-with.txt) != 0
   then
-    MANUFACTURERNAME=$( find device -type d | grep [^/]\*/[^/]\*/$DEVICENAME\$ | cut -f 2 -d / )
     (
       echo '# Copyright (C) 2011 The Android Open Source Project'
       echo '#'
@@ -117,6 +117,16 @@ do
         git push ssh://$1:29418/device/$MANUFACTURERNAME/$DEVICENAME.git HEAD:refs/for/$2/autoblobs
       fi
     )
+  else
+    (
+      cd device/$MANUFACTURERNAME/$DEVICENAME
+      git commit --allow-empty -m "$(echo -e 'DO NOT SUBMIT - BROKEN BUILD\n\nBug: 4295425')"
+      if test "$1" != "" -a "$2" != ""
+      then
+        echo uploading to server $1 branch $2
+        git push ssh://$1:29418/device/$MANUFACTURERNAME/$DEVICENAME.git HEAD:refs/for/$2/autoblobs
+      fi
+    )
   fi
 done