summaryrefslogtreecommitdiffstats
path: root/android_webview/build/install_binary
blob: ad63e0dcf182de52463c57d1ed408fb4262da1f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash -x
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Copies a possibly stripped binary and a symbol file to installation dirs.

if [ "$3" = "" ]
then
  echo "Usage: install_binary path/to/binary path/to/target1 path/to/target2 path/to/symbols path/to/symbols2"
  exit 1
fi

SOURCE=$1
TARGET=$2
TARGET2=$3
SYMBOLS=$4
SYMBOLS2=$5

mkdir -p $(dirname $SYMBOLS)

cp $SOURCE $SYMBOLS
# Create a hard link to avoid the additional copy to the secondary location.
ln $SYMBOLS $SYMBOLS2
$STRIP --strip-unneeded $SOURCE -o $TARGET
cp $TARGET $TARGET2