android_webview
apps
ash
base
build
3pp_common
android
apple
args
autoroll
chromeos
cipd
config
docs
fuchsia
gn_ast
internal
ios
linux
mac
private_code_test
rust
sanitizers
skia_gold_common
toolchain
util
win
.clang-tidy
.clangd
.git-blame-ignore-revs
.gitignore
.style.yapf
BUILD.gn
DEPS
DIR_METADATA
OWNERS
OWNERS.setnoparent
OWNERS.status
PRESUBMIT.py
PRESUBMIT_test.py
README.md
action_helpers.py
action_helpers_unittest.py
add_rts_filters.py
build-ctags.sh
build_config.h
buildflag.h
buildflag_header.gni
check_gn_headers.py
check_gn_headers_allowlist.txt
check_gn_headers_unittest.py
check_return_value.py
ciopfs.sha1
clobber.py
clobber_unittest.py
compiled_action.gni
compute_build_timestamp.py
copy_test_data_ios.py
cp.py
detect_host_arch.py
dotfile_settings.gni
download_nacl_toolchains.py
env_dump.py
extract_from_cab.py
extract_partition.py
find_depot_tools.py
fix_gn_headers.py
gdb-add-index
get_landmines.py
get_symlink_targets.py
gn_editor
gn_helpers.py
gn_helpers_unittest.py
gn_logs.gni
gn_run_binary.py
install-build-deps.py
install-build-deps.sh
install-chroot.sh
landmine_utils.py
landmines.py
locale_tool.py
mac_toolchain.py
metadata.json.in
nocompile.gni
noop.py
partitioned_shared_library.gni
precompile.cc
precompile.h
print_python_deps.py
protoc_java.py
protoc_java.pydeps
redirect_stdout.py
rm.py
sample_arg_file.gn
sanitize-mac-build-log.sed
sanitize-mac-build-log.sh
sanitize-win-build-log.sed
sanitize-win-build-log.sh
shim_headers.gni
symlink.gni
symlink.py
timestamp.gni
tree_truth.sh
update-linux-sandbox.sh
vs_toolchain.py
whitespace_file.txt
write_buildflag_header.py
xcode_binaries.yaml
zip_helpers.py
zip_helpers_unittest.py
build_overrides
buildtools
cc
chrome
chromecast
chromeos
clank
codelabs
components
content
crypto
dbus
device
docs
extensions
fuchsia_web
gin
google_apis
gpu
headless
infra
internal
ios
ios_internal
ipc
media
mojo
native_client
native_client_sdk
net
pdf
ppapi
printing
remoting
rlz
sandbox
services
signing_keys
skia
sql
storage
styleguide
testing
third_party
tools
ui
url
v8
webkit
.clang-format
.clang-tidy
.clangd
.git-blame-ignore-revs
.gitallowed
.gitattributes
.gitignore
.gitmodules
.gn
.mailmap
.rustfmt.toml
.vpython3
.yapfignore
ATL_OWNERS
AUTHORS
BUILD.gn
CODE_OF_CONDUCT.md
CPPLINT.cfg
CRYPTO_OWNERS
DEPS
DIR_METADATA
LICENSE
LICENSE.chromium_os
OWNERS
PRESUBMIT.py
PRESUBMIT_test.py
PRESUBMIT_test_mocks.py
README.md
WATCHLISTS
codereview.settings

This assumes that CQ has enough coverage for these scripts if they are important. Derived from https://crrev.com/c/4078643/4/build/android/pylib/symbols/mock_addr2line/mock_addr2line#1 This is made by $ rg -l '#!.*python$' build | \ xargs sed -i 's/\(#!.*\)python$/\1python3/' Bug: 1406153 Change-Id: I3df47e000c690ce8af341ff317539c4faa58e3bd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4159758 Reviewed-by: Ben Pastene <bpastene@chromium.org> Auto-Submit: Takuto Ikuta <tikuta@chromium.org> Commit-Queue: Ben Pastene <bpastene@chromium.org> Cr-Commit-Position: refs/heads/main@{#1091953}
24 lines
567 B
Python
Executable File
24 lines
567 B
Python
Executable File
#!/usr/bin/env python3
|
|
# Copyright 2012 The Chromium Authors
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
"""Copy a file.
|
|
|
|
This module works much like the cp posix command - it takes 2 arguments:
|
|
(src, dst) and copies the file with path |src| to |dst|.
|
|
"""
|
|
|
|
import os
|
|
import shutil
|
|
import sys
|
|
|
|
|
|
def Main(src, dst):
|
|
# Use copy instead of copyfile to ensure the executable bit is copied.
|
|
return shutil.copy(src, os.path.normpath(dst))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
sys.exit(Main(sys.argv[1], sys.argv[2]))
|