Jean-Baptiste Queru | fdec704 | 2012-09-11 14:18:35 -0700 | [diff] [blame] | 1 | # Copyright 2011 The Android Open Source Project |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
Jean-Baptiste Queru | 8422277 | 2012-10-01 16:13:55 -0700 | [diff] [blame] | 15 | # Use the default values if they weren't explicitly set |
| 16 | if test "$XLOADERSRC" = "" |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 17 | then |
Jean-Baptiste Queru | 8422277 | 2012-10-01 16:13:55 -0700 | [diff] [blame] | 18 | XLOADERSRC=xloader.img |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 19 | fi |
| 20 | if test "$BOOTLOADERSRC" = "" |
| 21 | then |
Jean-Baptiste Queru | 28b6c52 | 2012-04-02 12:17:56 -0700 | [diff] [blame] | 22 | BOOTLOADERSRC=bootloader.img |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 23 | fi |
Jean-Baptiste Queru | 8422277 | 2012-10-01 16:13:55 -0700 | [diff] [blame] | 24 | if test "$RADIOSRC" = "" |
| 25 | then |
| 26 | RADIOSRC=radio.img |
| 27 | fi |
| 28 | if test "$SLEEPDURATION" = "" |
| 29 | then |
| 30 | SLEEPDURATION=5 |
| 31 | fi |
| 32 | |
| 33 | # Prepare the staging directory |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 34 | rm -rf tmp |
| 35 | mkdir -p tmp/$PRODUCT-$VERSION |
Jean-Baptiste Queru | 8422277 | 2012-10-01 16:13:55 -0700 | [diff] [blame] | 36 | |
| 37 | # Extract the bootloader(s) and radio(s) as necessary |
| 38 | if test "$XLOADER" != "" |
| 39 | then |
| 40 | unzip -d tmp ${SRCPREFIX}$PRODUCT-target_files-$BUILD.zip RADIO/$XLOADERSRC |
| 41 | fi |
Jean-Baptiste Queru | d06dd40 | 2012-04-27 18:31:48 -0700 | [diff] [blame] | 42 | if test "$BOOTLOADERFILE" = "" |
| 43 | then |
| 44 | unzip -d tmp ${SRCPREFIX}$PRODUCT-target_files-$BUILD.zip RADIO/$BOOTLOADERSRC |
| 45 | fi |
Jean-Baptiste Queru | fdec704 | 2012-09-11 14:18:35 -0700 | [diff] [blame] | 46 | if test "$RADIO" != "" -a "$RADIOFILE" = "" |
Jean-Baptiste Queru | 9cb1b4a | 2012-04-19 08:44:21 -0700 | [diff] [blame] | 47 | then |
| 48 | unzip -d tmp ${SRCPREFIX}$PRODUCT-target_files-$BUILD.zip RADIO/$RADIOSRC |
| 49 | fi |
Jean-Baptiste Queru | fdec704 | 2012-09-11 14:18:35 -0700 | [diff] [blame] | 50 | if test "$CDMARADIO" != "" -a "$CDMARADIOFILE" = "" |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 51 | then |
Jean-Baptiste Queru | 9cb1b4a | 2012-04-19 08:44:21 -0700 | [diff] [blame] | 52 | unzip -d tmp ${SRCPREFIX}$PRODUCT-target_files-$BUILD.zip RADIO/radio-cdma.img |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 53 | fi |
Jean-Baptiste Queru | 8422277 | 2012-10-01 16:13:55 -0700 | [diff] [blame] | 54 | |
| 55 | # Copy the various images in their staging location |
Jean-Baptiste Queru | 9cb1b4a | 2012-04-19 08:44:21 -0700 | [diff] [blame] | 56 | cp ${SRCPREFIX}$PRODUCT-img-$BUILD.zip tmp/$PRODUCT-$VERSION/image-$PRODUCT-$VERSION.zip |
Jean-Baptiste Queru | 241b668 | 2012-11-02 08:48:35 -0700 | [diff] [blame] | 57 | if test "$XLOADER" != "" |
| 58 | then |
| 59 | cp tmp/RADIO/$XLOADERSRC tmp/$PRODUCT-$VERSION/xloader-$DEVICE-$XLOADER.img |
| 60 | fi |
Jean-Baptiste Queru | d06dd40 | 2012-04-27 18:31:48 -0700 | [diff] [blame] | 61 | if test "$BOOTLOADERFILE" = "" |
| 62 | then |
| 63 | cp tmp/RADIO/$BOOTLOADERSRC tmp/$PRODUCT-$VERSION/bootloader-$DEVICE-$BOOTLOADER.img |
| 64 | else |
| 65 | cp $BOOTLOADERFILE tmp/$PRODUCT-$VERSION/bootloader-$DEVICE-$BOOTLOADER.img |
| 66 | fi |
Jean-Baptiste Queru | 9cb1b4a | 2012-04-19 08:44:21 -0700 | [diff] [blame] | 67 | if test "$RADIO" != "" |
| 68 | then |
Jean-Baptiste Queru | fdec704 | 2012-09-11 14:18:35 -0700 | [diff] [blame] | 69 | if test "$RADIOFILE" = "" |
| 70 | then |
| 71 | cp tmp/RADIO/$RADIOSRC tmp/$PRODUCT-$VERSION/radio-$DEVICE-$RADIO.img |
| 72 | else |
| 73 | cp $RADIOFILE tmp/$PRODUCT-$VERSION/radio-$DEVICE-$RADIO.img |
| 74 | fi |
Jean-Baptiste Queru | 9cb1b4a | 2012-04-19 08:44:21 -0700 | [diff] [blame] | 75 | fi |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 76 | if test "$CDMARADIO" != "" |
| 77 | then |
Jean-Baptiste Queru | fdec704 | 2012-09-11 14:18:35 -0700 | [diff] [blame] | 78 | if test "$CDMARADIOFILE" = "" |
| 79 | then |
| 80 | cp tmp/RADIO/radio-cdma.img tmp/$PRODUCT-$VERSION/radio-cdma-$DEVICE-$CDMARADIO.img |
| 81 | else |
| 82 | cp $CDMARADIOFILE tmp/$PRODUCT-$VERSION/radio-cdma-$DEVICE-$CDMARADIO.img |
| 83 | fi |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 84 | fi |
Jean-Baptiste Queru | 8422277 | 2012-10-01 16:13:55 -0700 | [diff] [blame] | 85 | |
| 86 | # Write flash-all.sh |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 87 | cat > tmp/$PRODUCT-$VERSION/flash-all.sh << EOF |
| 88 | #!/bin/sh |
| 89 | |
Jean-Baptiste Queru | fdec704 | 2012-09-11 14:18:35 -0700 | [diff] [blame] | 90 | # Copyright 2012 The Android Open Source Project |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 91 | # |
| 92 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 93 | # you may not use this file except in compliance with the License. |
| 94 | # You may obtain a copy of the License at |
| 95 | # |
| 96 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 97 | # |
| 98 | # Unless required by applicable law or agreed to in writing, software |
| 99 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 100 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 101 | # See the License for the specific language governing permissions and |
| 102 | # limitations under the License. |
| 103 | |
Bill Yi | 2573c7c | 2021-08-30 15:00:45 -0700 | [diff] [blame] | 104 | if ! [ \$(\$(which fastboot) --version | grep "version" | cut -c18-23 | sed 's/\.//g' ) -ge 3103 ]; then |
Xin Li | 20e35d3 | 2018-03-29 15:33:27 -0700 | [diff] [blame] | 105 | echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" |
Xin Li | baf936a | 2017-10-30 09:21:28 -0700 | [diff] [blame] | 106 | exit 1 |
| 107 | fi |
Jean-Baptiste Queru | 9ceee56 | 2012-06-26 08:35:16 -0700 | [diff] [blame] | 108 | EOF |
Jean-Baptiste Queru | a705531 | 2012-11-19 08:30:28 -0800 | [diff] [blame] | 109 | if test "$UNLOCKBOOTLOADER" = "true" |
| 110 | then |
| 111 | cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF |
| 112 | fastboot oem unlock |
| 113 | EOF |
| 114 | fi |
Jean-Baptiste Queru | 9ceee56 | 2012-06-26 08:35:16 -0700 | [diff] [blame] | 115 | if test "$ERASEALL" = "true" |
| 116 | then |
| 117 | cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF |
| 118 | fastboot erase boot |
| 119 | fastboot erase cache |
| 120 | fastboot erase recovery |
| 121 | fastboot erase system |
| 122 | fastboot erase userdata |
| 123 | EOF |
| 124 | fi |
Jean-Baptiste Queru | 8422277 | 2012-10-01 16:13:55 -0700 | [diff] [blame] | 125 | if test "$XLOADER" != "" |
| 126 | then |
| 127 | cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF |
| 128 | fastboot flash xloader xloader-$DEVICE-$XLOADER.img |
| 129 | EOF |
| 130 | fi |
Jean-Baptiste Queru | 9ceee56 | 2012-06-26 08:35:16 -0700 | [diff] [blame] | 131 | cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 132 | fastboot flash bootloader bootloader-$DEVICE-$BOOTLOADER.img |
Jean-Baptiste Queru | 2466e5e | 2012-10-01 17:34:18 -0700 | [diff] [blame] | 133 | EOF |
| 134 | if test "$TWINBOOTLOADERS" = "true" |
| 135 | then |
| 136 | cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF |
| 137 | fastboot flash bootloader2 bootloader-$DEVICE-$BOOTLOADER.img |
| 138 | EOF |
| 139 | fi |
| 140 | cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 141 | fastboot reboot-bootloader |
Jean-Baptiste Queru | 9cb1b4a | 2012-04-19 08:44:21 -0700 | [diff] [blame] | 142 | sleep $SLEEPDURATION |
| 143 | EOF |
| 144 | if test "$RADIO" != "" |
| 145 | then |
| 146 | cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 147 | fastboot flash radio radio-$DEVICE-$RADIO.img |
| 148 | fastboot reboot-bootloader |
Jean-Baptiste Queru | 9cb1b4a | 2012-04-19 08:44:21 -0700 | [diff] [blame] | 149 | sleep $SLEEPDURATION |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 150 | EOF |
Jean-Baptiste Queru | 9cb1b4a | 2012-04-19 08:44:21 -0700 | [diff] [blame] | 151 | fi |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 152 | if test "$CDMARADIO" != "" |
| 153 | then |
| 154 | cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF |
| 155 | fastboot flash radio-cdma radio-cdma-$DEVICE-$CDMARADIO.img |
| 156 | fastboot reboot-bootloader |
Jean-Baptiste Queru | 9cb1b4a | 2012-04-19 08:44:21 -0700 | [diff] [blame] | 157 | sleep $SLEEPDURATION |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 158 | EOF |
| 159 | fi |
| 160 | cat >> tmp/$PRODUCT-$VERSION/flash-all.sh << EOF |
| 161 | fastboot -w update image-$PRODUCT-$VERSION.zip |
| 162 | EOF |
| 163 | chmod a+x tmp/$PRODUCT-$VERSION/flash-all.sh |
Jean-Baptiste Queru | 8422277 | 2012-10-01 16:13:55 -0700 | [diff] [blame] | 164 | |
| 165 | # Write flash-all.bat |
Wug Fresh | b5e3c7d | 2012-09-10 09:35:32 -0700 | [diff] [blame] | 166 | cat > tmp/$PRODUCT-$VERSION/flash-all.bat << EOF |
| 167 | @ECHO OFF |
| 168 | :: Copyright 2012 The Android Open Source Project |
| 169 | :: |
| 170 | :: Licensed under the Apache License, Version 2.0 (the "License"); |
| 171 | :: you may not use this file except in compliance with the License. |
| 172 | :: You may obtain a copy of the License at |
| 173 | :: |
| 174 | :: http://www.apache.org/licenses/LICENSE-2.0 |
| 175 | :: |
| 176 | :: Unless required by applicable law or agreed to in writing, software |
| 177 | :: distributed under the License is distributed on an "AS IS" BASIS, |
| 178 | :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 179 | :: See the License for the specific language governing permissions and |
| 180 | :: limitations under the License. |
| 181 | |
| 182 | PATH=%PATH%;"%SYSTEMROOT%\System32" |
| 183 | EOF |
Jean-Baptiste Queru | a705531 | 2012-11-19 08:30:28 -0800 | [diff] [blame] | 184 | if test "$UNLOCKBOOTLOADER" = "true" |
| 185 | then |
| 186 | cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF |
| 187 | fastboot oem unlock |
| 188 | EOF |
| 189 | fi |
Wug Fresh | b5e3c7d | 2012-09-10 09:35:32 -0700 | [diff] [blame] | 190 | if test "$ERASEALL" = "true" |
| 191 | then |
| 192 | cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF |
| 193 | fastboot erase boot |
| 194 | fastboot erase cache |
| 195 | fastboot erase recovery |
| 196 | fastboot erase system |
| 197 | fastboot erase userdata |
| 198 | EOF |
| 199 | fi |
Jean-Baptiste Queru | 8422277 | 2012-10-01 16:13:55 -0700 | [diff] [blame] | 200 | if test "$XLOADER" != "" |
| 201 | then |
| 202 | cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF |
| 203 | fastboot flash xloader xloader-$DEVICE-$XLOADER.img |
| 204 | EOF |
| 205 | fi |
Wug Fresh | b5e3c7d | 2012-09-10 09:35:32 -0700 | [diff] [blame] | 206 | cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF |
| 207 | fastboot flash bootloader bootloader-$DEVICE-$BOOTLOADER.img |
Jean-Baptiste Queru | 2466e5e | 2012-10-01 17:34:18 -0700 | [diff] [blame] | 208 | EOF |
| 209 | if test "$TWINBOOTLOADERS" = "true" |
| 210 | then |
| 211 | cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF |
| 212 | fastboot flash bootloader2 bootloader-$DEVICE-$BOOTLOADER.img |
| 213 | EOF |
| 214 | fi |
| 215 | cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF |
Wug Fresh | b5e3c7d | 2012-09-10 09:35:32 -0700 | [diff] [blame] | 216 | fastboot reboot-bootloader |
| 217 | ping -n $SLEEPDURATION 127.0.0.1 >nul |
| 218 | EOF |
| 219 | if test "$RADIO" != "" |
| 220 | then |
| 221 | cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF |
| 222 | fastboot flash radio radio-$DEVICE-$RADIO.img |
| 223 | fastboot reboot-bootloader |
| 224 | ping -n $SLEEPDURATION 127.0.0.1 >nul |
| 225 | EOF |
| 226 | fi |
| 227 | if test "$CDMARADIO" != "" |
| 228 | then |
| 229 | cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF |
| 230 | fastboot flash radio-cdma radio-cdma-$DEVICE-$CDMARADIO.img |
| 231 | fastboot reboot-bootloader |
| 232 | ping -n $SLEEPDURATION 127.0.0.1 >nul |
| 233 | EOF |
| 234 | fi |
| 235 | cat >> tmp/$PRODUCT-$VERSION/flash-all.bat << EOF |
| 236 | fastboot -w update image-$PRODUCT-$VERSION.zip |
| 237 | |
| 238 | echo Press any key to exit... |
| 239 | pause >nul |
| 240 | exit |
| 241 | EOF |
Jean-Baptiste Queru | 8422277 | 2012-10-01 16:13:55 -0700 | [diff] [blame] | 242 | |
| 243 | # Write flash-base.sh |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 244 | cat > tmp/$PRODUCT-$VERSION/flash-base.sh << EOF |
| 245 | #!/bin/sh |
| 246 | |
Jean-Baptiste Queru | fdec704 | 2012-09-11 14:18:35 -0700 | [diff] [blame] | 247 | # Copyright 2012 The Android Open Source Project |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 248 | # |
| 249 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 250 | # you may not use this file except in compliance with the License. |
| 251 | # You may obtain a copy of the License at |
| 252 | # |
| 253 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 254 | # |
| 255 | # Unless required by applicable law or agreed to in writing, software |
| 256 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 257 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 258 | # See the License for the specific language governing permissions and |
| 259 | # limitations under the License. |
| 260 | |
Bill Yi | 2573c7c | 2021-08-30 15:00:45 -0700 | [diff] [blame] | 261 | if ! [ \$(\$(which fastboot) --version | grep "version" | cut -c18-23 | sed 's/\.//g' ) -ge 3103 ]; then |
Xin Li | 20e35d3 | 2018-03-29 15:33:27 -0700 | [diff] [blame] | 262 | echo "fastboot too old; please download the latest version at https://developer.android.com/studio/releases/platform-tools.html" |
Xin Li | baf936a | 2017-10-30 09:21:28 -0700 | [diff] [blame] | 263 | exit 1 |
| 264 | fi |
Jean-Baptiste Queru | 8422277 | 2012-10-01 16:13:55 -0700 | [diff] [blame] | 265 | EOF |
| 266 | if test "$XLOADER" != "" |
| 267 | then |
| 268 | cat >> tmp/$PRODUCT-$VERSION/flash-base.sh << EOF |
| 269 | fastboot flash xloader xloader-$DEVICE-$XLOADER.img |
| 270 | EOF |
| 271 | fi |
| 272 | cat >> tmp/$PRODUCT-$VERSION/flash-base.sh << EOF |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 273 | fastboot flash bootloader bootloader-$DEVICE-$BOOTLOADER.img |
Jean-Baptiste Queru | 2466e5e | 2012-10-01 17:34:18 -0700 | [diff] [blame] | 274 | EOF |
| 275 | if test "$TWINBOOTLOADERS" = "true" |
| 276 | then |
| 277 | cat >> tmp/$PRODUCT-$VERSION/flash-base.sh << EOF |
| 278 | fastboot flash bootloader2 bootloader-$DEVICE-$BOOTLOADER.img |
| 279 | EOF |
| 280 | fi |
| 281 | cat >> tmp/$PRODUCT-$VERSION/flash-base.sh << EOF |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 282 | fastboot reboot-bootloader |
Jean-Baptiste Queru | 9cb1b4a | 2012-04-19 08:44:21 -0700 | [diff] [blame] | 283 | sleep $SLEEPDURATION |
| 284 | EOF |
| 285 | if test "$RADIO" != "" |
| 286 | then |
| 287 | cat >> tmp/$PRODUCT-$VERSION/flash-base.sh << EOF |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 288 | fastboot flash radio radio-$DEVICE-$RADIO.img |
| 289 | fastboot reboot-bootloader |
Jean-Baptiste Queru | 9cb1b4a | 2012-04-19 08:44:21 -0700 | [diff] [blame] | 290 | sleep $SLEEPDURATION |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 291 | EOF |
Jean-Baptiste Queru | 9cb1b4a | 2012-04-19 08:44:21 -0700 | [diff] [blame] | 292 | fi |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 293 | if test "$CDMARADIO" != "" |
| 294 | then |
| 295 | cat >> tmp/$PRODUCT-$VERSION/flash-base.sh << EOF |
| 296 | fastboot flash radio-cdma radio-cdma-$DEVICE-$CDMARADIO.img |
| 297 | fastboot reboot-bootloader |
Jean-Baptiste Queru | 9cb1b4a | 2012-04-19 08:44:21 -0700 | [diff] [blame] | 298 | sleep $SLEEPDURATION |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 299 | EOF |
| 300 | fi |
| 301 | chmod a+x tmp/$PRODUCT-$VERSION/flash-base.sh |
Jean-Baptiste Queru | 8422277 | 2012-10-01 16:13:55 -0700 | [diff] [blame] | 302 | |
| 303 | # Create the distributable package |
Bill Yi | d68beab | 2016-08-31 10:34:36 -0700 | [diff] [blame] | 304 | (cd tmp ; zip -r ../$PRODUCT-$VERSION-factory.zip $PRODUCT-$VERSION) |
| 305 | mv $PRODUCT-$VERSION-factory.zip $PRODUCT-$VERSION-factory-$(sha256sum < $PRODUCT-$VERSION-factory.zip | cut -b -8).zip |
Jean-Baptiste Queru | 8422277 | 2012-10-01 16:13:55 -0700 | [diff] [blame] | 306 | |
| 307 | # Clean up |
Jean-Baptiste Queru | 36cbd9a | 2012-04-02 11:01:12 -0700 | [diff] [blame] | 308 | rm -rf tmp |