Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2112)

Unified Diff: build/android/pylib/efficient_android_directory_copy.sh

Issue 2392643003: Removes files from //build that we don't need (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/device_signal.py ('k') | build/android/pylib/flag_changer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/efficient_android_directory_copy.sh
diff --git a/build/android/pylib/efficient_android_directory_copy.sh b/build/android/pylib/efficient_android_directory_copy.sh
deleted file mode 100755
index 7021109e273e1b45649159405d14e1f27fe4a7fe..0000000000000000000000000000000000000000
--- a/build/android/pylib/efficient_android_directory_copy.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/system/bin/sh
-
-# 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.
-
-source=$1
-dest=$2
-echo copying $source to $dest
-
-delete_extra() {
- # Don't delete symbolic links, since doing so deletes the vital lib link.
- if [ ! -L "$1" ]
- then
- if [ ! -e "$source/$1" ]
- then
- echo rm -rf "$dest/$1"
- rm -rf "$dest/$1"
- elif [ -d "$1" ]
- then
- for f in "$1"/*
- do
- delete_extra "$f"
- done
- fi
- fi
-}
-
-copy_if_older() {
- if [ -d "$1" ] && [ -e "$dest/$1" ]
- then
- if [ ! -e "$dest/$1" ]
- then
- echo cp -a "$1" "$dest/$1"
- cp -a "$1" "$dest/$1"
- else
- for f in "$1"/*
- do
- copy_if_older "$f"
- done
- fi
- elif [ ! -e "$dest/$1" ] || [ "$1" -ot "$dest/$1" ] || [ "$1" -nt "$dest/$1" ]
- then
- # dates are different, so either the destination of the source has changed.
- echo cp -a "$1" "$dest/$1"
- cp -a "$1" "$dest/$1"
- fi
-}
-
-if [ -e "$dest" ]
-then
- echo cd "$dest"
- cd "$dest"
- for f in ./*
- do
- if [ -e "$f" ]
- then
- delete_extra "$f"
- fi
- done
-else
- echo mkdir "$dest"
- mkdir "$dest"
-fi
-echo cd "$source"
-cd "$source"
-for f in ./*
-do
- if [ -e "$f" ]
- then
- copy_if_older "$f"
- fi
-done
« no previous file with comments | « build/android/pylib/device_signal.py ('k') | build/android/pylib/flag_changer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698