Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structured inputs for Rust (and more languages in the future, probably) #8775

Closed
Closed
Prev Previous commit
Next Next commit
scripts: Add a script to copy files.
  • Loading branch information
dcbaker committed May 17, 2021
commit 3e2b7fc27f70191a60b5f25b78c7f541f24a0de6
18 changes: 18 additions & 0 deletions mesonbuild/scripts/copy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# SPDX-License-Identifer: Apache-2.0
# Copyright © 2021 Intel Corporation

"""Helper script to copy files at build time.

This is easier than trying to detect whether to use copy, cp, or something else.
"""

import shutil
import typing as T


def run(args: T.List[str]) -> int:
try:
shutil.copy2(args[0], args[1])
except Exception:
return 1
return 0