| OLD | NEW |
| 1 #!/bin/bash -x | 1 #!/bin/bash -x |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # Copies a possibly stripped binary and a symbol file to installation dirs. | 6 # Copies a possibly stripped binary and a symbol file to installation dirs. |
| 7 | 7 |
| 8 if [ "$3" = "" ] | 8 if [ "$3" = "" ] |
| 9 then | 9 then |
| 10 echo "Usage: install_binary path/to/binary path/to/target1 path/to/target2 pat
h/to/symbols" | 10 echo "Usage: install_binary path/to/binary path/to/target1 path/to/target2 pat
h/to/symbols path/to/symbols2" |
| 11 exit 1 | 11 exit 1 |
| 12 fi | 12 fi |
| 13 | 13 |
| 14 SOURCE=$1 | 14 SOURCE=$1 |
| 15 TARGET=$2 | 15 TARGET=$2 |
| 16 TARGET2=$3 | 16 TARGET2=$3 |
| 17 SYMBOLS=$4 | 17 SYMBOLS=$4 |
| 18 SYMBOLS2=$5 |
| 18 | 19 |
| 19 mkdir -p $(dirname $SYMBOLS) | 20 mkdir -p $(dirname $SYMBOLS) |
| 20 | 21 |
| 21 cp $SOURCE $SYMBOLS | 22 cp $SOURCE $SYMBOLS |
| 23 # Create a hard link to avoid the additional copy to the secondary location. |
| 24 ln $SYMBOLS $SYMBOLS2 |
| 22 $STRIP --strip-unneeded $SOURCE -o $TARGET | 25 $STRIP --strip-unneeded $SOURCE -o $TARGET |
| 23 cp $TARGET $TARGET2 | 26 cp $TARGET $TARGET2 |
| OLD | NEW |