blob: 6d4a3a84c163a4dd89cb20c31cc720ccbd88d615 [file] [log] [blame]
Mads Ager418d1ca2017-05-22 09:35:49 +02001#! /bin/bash
2# Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file
3# for details. All rights reserved. Use of this source code is governed by a
4# BSD-style license that can be found in the LICENSE file.
5
6# This script will update the host dx and dexmerger tools in tools/linux/dx.
7
8# Before running this script make sure the dx and dexmerger versions required are built
9# in ~/android/master (There are probably simpler ways to just build dx and dexmerger):
10#
11# m -j24 build-art
12#
13# Maybe also run the Art host tests:
14#
15# mm -j24 art-test-host
16#
17
18ANDROID_CHECKOUT=~/android/master
19ANDROID_HOST_BUILD=$ANDROID_CHECKOUT/out/host/linux-x86
20LINUX_TOOLS=tools/linux
21DX_DIR=dx
22DEST=$LINUX_TOOLS/$DX_DIR
23
24# Clean out the previous version of Art
25rm -rf $DEST
26
27# Required binaries and scripts.
28mkdir -p $DEST/bin
29cp $ANDROID_HOST_BUILD/bin/dx $DEST/bin
30cp $ANDROID_HOST_BUILD/bin/dexmerger $DEST/bin
31
32# Required framework files.
33mkdir -p $DEST/framework
34cp $ANDROID_HOST_BUILD/framework/dx.jar $DEST/framework
35
36# Build the tar to upload to Google Cloud Storage.
37DX_ARCHIVE=$DX_DIR.tar.gz
38pushd $LINUX_TOOLS > /dev/null
39rm -f $DX_ARCHIVE
40rm -f $DX_ARCHIVE.sha1
41tar caf $DX_ARCHIVE $DX_DIR
42popd > /dev/null
43
44echo "New $LINUX_TOOLS/$DX_ARCHIVE archive created."
45echo ""
46echo "Now run:"
47echo ""
48echo " cd $LINUX_TOOLS"
49echo " upload_to_google_storage.py --bucket r8-deps $DX_DIR.tar.gz"
50echo ""
51echo "to upload to Google Cloud Storage"