1
0
forked from ALHP/ALHP.GO

followup fixes for new weighted build-queue

This commit is contained in:
2022-02-19 19:39:48 +01:00
parent ba159e0a72
commit 270889bf5c
4 changed files with 38 additions and 6 deletions

18
rm_chroot.py Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env python3
import os
import sys
from pathlib import Path
SAVE_PATH = "/path/to/workdir"
try:
chroot_abs = Path(sys.argv[1]).resolve(True)
except:
print("path does not resolve")
sys.exit(1)
if str(chroot_abs).startswith(SAVE_PATH):
os.system("rm -rf " + str(chroot_abs))
else:
sys.exit(2)