diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-09-29 12:28:25 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-09-29 12:28:25 +0200 |
commit | 0bca795456f64bd29285a32abb2d3674e12923df (patch) | |
tree | 5b3b6c6ba398dfdf4220cc05542fe0c54145863d /test/create-sys-script.py | |
parent | 227ef9bc38804b04620420f57226246fab1a0a9c (diff) | |
download | systemd-0bca795456f64bd29285a32abb2d3674e12923df.tar.gz |
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.
Diffstat (limited to 'test/create-sys-script.py')
-rwxr-xr-x | test/create-sys-script.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/create-sys-script.py b/test/create-sys-script.py index 24a00f7a93..a4f1f302f6 100755 --- a/test/create-sys-script.py +++ b/test/create-sys-script.py @@ -36,6 +36,7 @@ OUTFILE_MODE = 0o775 OUTFILE_FUNCS = r""" import os, sys +import shutil def d(path, mode): os.mkdir(path, mode) @@ -58,6 +59,8 @@ if not os.path.isdir(sys.argv[1]): os.chdir(sys.argv[1]) +if os.path.exists('sys'): + shutil.rmtree('sys') """ |