| # Copyright 2014 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. |
| # Android shell script to make the destination directory identical with the |
| # source directory, without doing unnecessary copies. This assumes that the |
| # the destination directory was originally a copy of the source directory, and |
| # has since been modified. |
| echo copying $source to $dest |
| # Don't delete symbolic links, since doing so deletes the vital lib link. |
| if [ -d "$1" ] && [ -e "$dest/$1" ] |
| echo cp -a "$1" "$dest/$1" |
| elif [ ! -e "$dest/$1" ] || [ "$1" -ot "$dest/$1" ] || [ "$1" -nt "$dest/$1" ] |
| # dates are different, so either the destination of the source has changed. |
| echo cp -a "$1" "$dest/$1" |