mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
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.
This commit is contained in:
@@ -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')
|
||||
"""
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user