From 642960987865fe1a7f5ec729f5fc3951cce260f6 Mon Sep 17 00:00:00 2001 From: MichelJuillard <michel.juillard@mjui.fr> Date: Fri, 29 Sep 2023 18:40:56 +0200 Subject: [PATCH] add copy.py --- copy.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 copy.py diff --git a/copy.py b/copy.py new file mode 100755 index 00000000..fd6c586c --- /dev/null +++ b/copy.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 + +import os, sys, shutil + +# get absolute input and output paths +input_path = os.path.join( + os.getenv('MESON_SOURCE_ROOT'), + os.getenv('MESON_SUBDIR'), + sys.argv[1]) + +output_path = os.path.join( + os.getenv('MESON_BUILD_ROOT'), + os.getenv('MESON_SUBDIR'), + sys.argv[2]) + +# make sure destination directory exists +os.makedirs(os.path.dirname(output_path), exist_ok=True) + +# and finally copy the file +shutil.copyfile(input_path, output_path) -- GitLab