From 0bca795456f64bd29285a32abb2d3674e12923df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 29 Sep 2017 12:28:25 +0200 Subject: sys-script: remove output directory if it exists meson will occasionally call us even though the output directory exists. Let's just nuke and recreate in that case. --- test/sys-script.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/sys-script.py') diff --git a/test/sys-script.py b/test/sys-script.py index ac1369735b..2de7d7ea30 100755 --- a/test/sys-script.py +++ b/test/sys-script.py @@ -20,6 +20,7 @@ # import os, sys +import shutil def d(path, mode): os.mkdir(path, mode) @@ -40,6 +41,8 @@ if not os.path.isdir(sys.argv[1]): os.chdir(sys.argv[1]) +if os.path.exists('sys'): + shutil.rmtree('sys') d('sys', 0o755) d('sys/kernel', 0o775) f('sys/kernel/kexec_crash_loaded', 0o664, b'0\n') -- cgit v1.2.1