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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user