From c11e37645e0d1757da50ba35051bfa841c97d9ed Mon Sep 17 00:00:00 2001
From: MichelJuillard <michel.juillard@mjui.fr>
Date: Fri, 29 Sep 2023 18:45:01 +0200
Subject: [PATCH] put copy.py in src

---
 src/copy.py | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100755 src/copy.py

diff --git a/src/copy.py b/src/copy.py
new file mode 100755
index 00000000..fd6c586c
--- /dev/null
+++ b/src/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